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 ......

Visual Basic Classic

Avatar of undefined
Last Comment
PandaYong

8/22/2022 - Mon
Mohammed Nasman

Hello

  You mean like this?

Private Sub Command1_Click()
  Dim frm As Form
  Set frm = New Form2
  frm.Show
End Sub
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
Cimperiali

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
PandaYong

ASKER
Thank You !
Thank You to everyone who is helping.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck