Reputation: 17647
What is the actual value/meaning of a semi colon ( ; ) with the Debug.Print
statement in VBA?
I use this often but have no real understanding of it, all I know is that it isn't equal to the vbTab
constant as the spacing isn't the same.
i.e.
Debug.Print 123;456;789
Debug.Print 123 & vbTab & 456 & vbTab & 789
produce different outputs.
Upvotes: 5
Views: 1631
Reputation: 234825
It suppresses the generation of a newline character sequence which would otherwise cause a subsequent call to Debug.Print
to output on the next line.
(In your case it's redundant: you'd see an explicit effect if you adjust your first line to Debug.Print 123;456;789;
)
Upvotes: 6
Reputation: 13979
A ;
at the end of a Print statement suppresses the usual default CRLF
.
Upvotes: 5