GarethD.Norris
August 16th, 2008, 04:18 AM
Hi All,
I have just taken the leap from VB6 to VB2008 and am not finding it too bad but I have now come across a scenario which has got me stumped:
I am trying to declare an object with the name dynamically assigned from the contents of the string as per the example below:
Public Shared Function Launch_Session(ByVal Session_Path As String, ByVal Session_File As String) As Boolean
Dim Session_File.Value As Object
' Do other things here
End Function I am not even sure if this is possible but I need some way of using the same code to generate multiple objects based on the parameters sent to the function. I need to do this to use each of the objects created independently.
Any idea on how to get this working or an alternative solution?
Thanks,
Gareth.
I have just taken the leap from VB6 to VB2008 and am not finding it too bad but I have now come across a scenario which has got me stumped:
I am trying to declare an object with the name dynamically assigned from the contents of the string as per the example below:
Public Shared Function Launch_Session(ByVal Session_Path As String, ByVal Session_File As String) As Boolean
Dim Session_File.Value As Object
' Do other things here
End Function I am not even sure if this is possible but I need some way of using the same code to generate multiple objects based on the parameters sent to the function. I need to do this to use each of the objects created independently.
Any idea on how to get this working or an alternative solution?
Thanks,
Gareth.