PDA

View Full Version : Solved: Wrapping Code Text



GregE
04-10-2008, 09:13 AM
Hi

Again, I'm totally new to the world of VBA...

Is there some way to wrap a line of code on to the next line in the program so long lines of code don't stretch out forever across a page?

Greg

CreganTur
04-10-2008, 09:53 AM
Yes there is- it can be done by using an underscore (shift + hyphen [button between numKey 0 and equal sign)

You just have to make sure that you put it in a smart place- it'll yell at you if you put it somewhere you shouldn't.

MsgBox "You are currently not authorized to use this database." & vbCrLf _
& vbCrLf & "Please contact your manager to be added.", vbExclimation + vbOKOnly, _
"Unauthorized User"

GregE
04-10-2008, 10:05 AM
Thanks...That worked!

Greg

CreganTur
04-10-2008, 11:12 AM
Thanks...That worked!

Greg

Great, glad to hear it!

Since your problem's solved, would you mind marking the thread as solved? Just click on Thread Tools and select "Mark as Solved".

GregE
04-10-2008, 12:04 PM
I will...

Thanks

mdmackillop
04-10-2008, 01:13 PM
MsgBox "Note that if you are doing this with text, " & _
"you need to insert spacing and use amersand to join the strings"