Semi-Colon

  • Thread starter Thread starter colin.steadman
  • Start date Start date
C

colin.steadman

Does the semicolon have a special meaning is VBA? I just typed this
line and forgot to add an '&' after the sFileName variable:

If developerMessages = True Then Debug.Print sFileName " accepted,
Access importing it."

When I hit return VBa added a semicolon to it as follows:

If developerMessages = True Then Debug.Print sFileName; " accepted,
Access importing it."

TIA

Colin
 
In that context you need:
debug.print sFilename & " blah"
or:
debug.print sFilename; " blah"

I'm surprised that the editor added the semicolon automatically - but
it is actually just what you want!

Try the difference between:
debug.print 1, 2, 3
and:
debug.print 1; 2; 3
and you'll soon get the idea.

HTH,
TC (MVP Access)
http://tc2.atspace.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top