Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / April 2004



Tip: Looking for answers? Try searching our database.

display forms based on variable name

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike - 30 Apr 2004 03:20 GMT
I have a combo box with a listing of 23 forms.

When the user makes a selection I want to call up the selected form based on
the selected text.

Is it possible to open a form based on a variable for its name

similar to

My_Form.Name = combo1.text

My_Form.show

thanks in advance

Mike
Randy Day - 30 Apr 2004 04:07 GMT
> I have a combo box with a listing of 23 forms.
>
[quoted text clipped - 8 lines]
>
> My_Form.show

I don't think so. The closest you're likely
to get is either:

1) put everything in a Select Case statement:

Select Case combo1.listindex
case 0: form1.show
case 1: form2.show
'
'
case -1: 'nothing was chosen
end select

2) put your forms in a control array, then do:

arrForms(combo1.listindex).show

> thanks in advance
>
> Mike
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.