PDA

View Full Version : Need Help with the Easist Question Ever



inchworm
06-27-2008, 09:30 AM
How do I put two commands on one line in VBA? I thought it was a semicolon, but that is not working - I am getting a syntax error.

Instead of:
Array(0) = "smith"
Array(1) = "jones"

I want them both on one line:
Array(0) = "smith"; Array(1) = "jones"

Seems like it should be so simple but I can't find an answer.

Thanks!

Ago
06-27-2008, 10:43 AM
i just need to know..

why would you need that?
whats the problem with having it on two lines?

inchworm
06-27-2008, 10:46 AM
It makes the code long and harder to read.

Ago
06-27-2008, 11:01 AM
so you wnat the code to be long and hard to read? ;-)

never tried it myself because i cant see the point of it but : seems to do the job according to google

Bob Phillips
06-27-2008, 11:19 AM
It is a colon, not semi-colon