问题
I want to display long message in MsgBox (more then 1024 characters). What method can i use. I found this:
Dim objShell As Object
Set objShell = CreateObject("Wscript.Shell")
Can You tell me are there any methods to achieve this? Maybe someone know better solution or disadvantages of using Wscript.Shell??
Oh, and one more thing, I want to add this code to an add-in i've created and which I want to distribute to othet coworkers..
回答1:
So create a Form that looks like a MsgBox:
I used a TextBox instead of a Label and set the back colour to grey. I also specified for the TextBox scroll property to "Vertical Scrollbar" so if the text exceeds the viewable limit you'll be able to scroll.
Feel free to set the TextBox border property to Not Set, it's read-only property to True and add a MsgBox picturebox for a more authentic look.
来源:https://stackoverflow.com/questions/51094955/vba-msgbox-limitations-output-more-than-1024-characters