How to pass a parameter to a userform

  • Thread starter Thread starter Gromit
  • Start date Start date
G

Gromit

Hi,

I need to both open a useform and pass a parameter to it. How do I do
this? I'd like to do the following but the Show method doesn't take
this kind of parameter.

Userform1.Show(param)

Cheers

Gromit
 
Create a public variable in the userform, say called myVar, and then

Load Userform1
Userform1.myVar = "SomeValue"
Userform1.Show


and then use myVar in the form

--

HTH

RP
(remove nothere from the email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top