Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

VBA Debug.Print semi colon

Tags:

vba

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.

like image 790
SierraOscar Avatar asked Feb 27 '15 15:02

SierraOscar


2 Answers

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;)

like image 123
Bathsheba Avatar answered Sep 30 '22 16:09

Bathsheba


A ; at the end of a Print statement suppresses the usual default CRLF.

like image 38
Leo Chapiro Avatar answered Sep 30 '22 16:09

Leo Chapiro