Passing variable string from WorkbookOpen to userform

Nyanko

Active Member
Joined
Sep 1, 2005
Messages
437
I'm trying to pass a string value from the WorkbookOpen module to a label or textbox on a userform. This will enable me to devise a custom welcome splash screen

I can't seem to pass the contents of the variable from the module to the userform. I've researched and either my search terms are wrong or I can't find the solution I'm looking for. Thought it would be simple :(
 
Did you see Rory's post, #6 I think?
 
Last edited:
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Where specifically (which module) is this line:
Code:
Public pwdmsg As String

Note: if you use the syntax I posted, you don't need a public variable.

I just realized I had a duplicate declaration of the pwdmsg in the Workbook_Open() module it's working great now :)
 
Upvote 0
I tend to use a text box which is hidden on the form. when the open event initializes the form it populates the text box, then when any eent is executed on the form i refer to the value held in the text box. that way you wont get memory lifetime and scope issues.

hope it helps

Cheers

M
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top