Well i have a sub that outputs a long message box. What I want to do is add whats in the msgbox into a listbox in a vba form?
Here is the message box i need to transfer.
Thanks for any help
Please Login or Register to view this content.
Well i have a sub that outputs a long message box. What I want to do is add whats in the msgbox into a listbox in a vba form?
Here is the message box i need to transfer.
Thanks for any help
Please Login or Register to view this content.
Last edited by danielgri14; 04-27-2011 at 07:56 PM.
So you just want this displayed in a userform?
Do you want the variables count1,2,3... and sumLB1,2,3... pushed into the form?
How would it look, something like the attached?
danielgri14,
What I think you want is a textbox or label instead of a listbox. A listbox can only hold a list of data and is usually populated via the RowSource property.
To put the msgbox contents into a textbox, you would set the textbox.text property = the msgbox contents (instead of using the messagebox). For a label it would use the label.caption property.
Example:
-Add a textbox or label to the userform
-The sample code assumes the textbox is named TextBox1 or the label is named Label1
Please Login or Register to view this content.
Hope that helps,
~tigeravatar
Ok got it, i just had to set the txtbox to multiline
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks