简体   繁体   中英

Immediate Window (console-style) output to Excel dashboard from VBA

What would be a simple and efficient way to output multiple rows of string data to an Excel dashboard during data processing from VBA? Ideally I would like it to be in a scrollable popup object (displaying errors from the data that was processed) that can be positioned like a message box without affecting the rows and columns below.

Previously I have used other methods like MsgBox and Cell.Value but they have too many limitations (unable to close, slow refresh rate, not scrollable, etc.).

The VBA Immediate Window is perfect, but it is only visible when the VBA editor is open, so therefore not suitable for dashboard purposes.

I guess you could create a userform with a multiline textbox. You have to set the ShowModal property to false in order to let the main macro continue working while the userform is showing.

It's similar to this example where they create a progressbar. Instead of a bar you can add text to a multiline textbox:

https://wellsr.com/vba/2017/excel/beautiful-vba-progress-bar-with-step-by-step-instructions/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM