Link to home
Start Free TrialLog in
Avatar of Tocogroup
TocogroupFlag for United Kingdom of Great Britain and Northern Ireland

asked on

How do I pass an argument to an Excel userform in VBA ?

Hi Experts,

I am building an application in Excel VBA and have a user form (ufOrdersForm) with a text box control which holds an invoice number.

When the user double-clicks the text box I want its value (an invoice number) to pass to another form (ufSalesForm) as follows......

Private Sub teInvoiceNo1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)

   Application.ScreenUpdating = False
   Unload Me
   ufSalesForm.Show
   Application.ScreenUpdating = True

End Sub

How do I pass the argument from the procedure above to the intended user form ?

Thanks in anticipation ?
Toco
ASKER CERTIFIED SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tocogroup

ASKER

Thanks Brad. Tried both methods and they work great.
Cheers
Toco