VBA MsgBox Limitations - output more than 1024 characters

给你一囗甜甜゛ 提交于 2021-01-28 06:38:59

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!