Link to home
Start Free TrialLog in
Avatar of PandaYong
PandaYong

asked on

Show form using variable

Greeting,

  In conventional way, I use

     formName.show

to show a form. I just want to know can  i declare a variable to store the form name, so later on  i can show the form depends on the value in the variable ?

If yes. How ?

Thanks for replying ......

Avatar of Mohammed Nasman
Mohammed Nasman
Flag of Palestine, State of image

Hello

  You mean like this?

Private Sub Command1_Click()
  Dim frm As Form
  Set frm = New Form2
  frm.Show
End Sub
Avatar of VBtom
VBtom

you ask the same question twice :(
Look at the other place you asked this question
https://www.experts-exchange.com/questions/20557035/show-from-by-using-object-variable.html
ASKER CERTIFIED SOLUTION
Avatar of Cimperiali
Cimperiali
Flag of Italy 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 PandaYong

ASKER

Thank You !
Thank You to everyone who is helping.