Hi im a student programmer and I was writing a program... and I need to beable to load a form from string variable like

Private Sub cmdLoad_Click()

dim strFormLink(99) as string


End Sub

That will not work... Have Any ideas(If you do I'd be really greatful

I tried code like this

Dim FrmObj As Form, TempObj As Form
Dim StrVal As String
Dim Find As Boolean

Find = False
StrVal = "Form2"

For Each TempObj In Forms

If TempObj.Name = StrVal Then

Set FrmObj = TempObj
Find = True

End If


If Find = True Then FrmObj.Show

But Its too much for the program to handle(Because its a game... and its already really slugish

I am implimenting this code because I have added a map editor so I do not need to open the source code and recompile when making changes to the map... All I have to do is edit the map

9 Years
Discussion Span
Last Post by CzechRock3

i m not sure u can do this. if you use variable to accommodate form name there are no function to call form. your variable still a string.


Yah, I did a little more research and there is not other way. Thanks for your help. I managed to solve the problem.

I was trying to make it more efficient xD

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.