How to overcome the limitation of MsgBox?

This time I am writing after a long time. I was debugging a script during which I was stuck in an issue due to which I got to learn something new which I would love to share on this platform.

What was happening was: During debugging of the script, I needed to check whether the value of variable is getting assigned properly, so I used msgbox to verify the value. I was shocked to see that the value was truncated in the message box even though Debug Viewer > Watch tab was displaying the full value.

Then, by Hit and Trial, I got to know that the limitation of msgbox function is 1023 characters.

As an alternative, we can use Windows Shell object to overcome this limitation.

‘Code to display more than 1023 characters (limitation of msgbox function)

Set wshell=CreateObject(“”)

wshell.popup (variable with more than 1023 characters)


Tagged with: , ,
Posted in Awesum Stuff
2 comments on “How to overcome the limitation of MsgBox?
  1. shashank chaturvedi says:

    Or u can use print command as well?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog Stats
  • 168,130 hits

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 796 other followers

%d bloggers like this: