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

strFormLink(1).Show

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

Next

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

From you code i am not at all sure what you want to do. Could you explain a bit.

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