Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I see the whole watch for a long string?

Status
Not open for further replies.

jeffmoore

Programmer
Aug 29, 2003
301
US
I have a string that is over 255 characters long (a SQL string). When I try to look at the variable in VBA's watch window I can only see the first 255 characters. I'm hoping that this is a limitation of the watch window and not a coding limitation. ie a string can't be more than 255 chrs long.
any thoughts on a work around?
TIA
Jeff
 
I use something like

MsgBox strSQL , , "SQL for xxxx "




'ope-that-'elps.


G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
If you want, you can go to the immediate window and type

?strVariableName


and assuming the code has stopped where the variable is in scope, it will print the contents of the string on the next line. Cut-and-pasteable!
 
foolio12:

That would have been my suggestion as well. I use that for some variables.

jeffmoore:

another option would be to use the debug.print command for that variable in the code. That way, it will print when it get's to that line in the code. Sometimes I have a stop right after the print line, so I know it stops there, no matter what.

GComyn
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top