Cor,
ok might be a bad example.
Imagine a project
I've got two dll's referenced, dll1 and dll2
within some function of my project i want to use a function out of dll1/dll2
Normally you then would put in the function:
Function fncSomeProjFunc as int
dim myobj as dll1 (Make the functions of dll1 available inside this
function)
dim myobj2 as dll2
dim sResult as string
dim sResult2 as string
sResult = myobj.SomeFunctionwithsResultAsReturnValue
sResult2 = myobj2.SomeFunctionwithsResultAsReturnValue
return 1
end function
this is what Mohammed suggested, agree?
Now what i want is this
Function fncSomeProjFunc(byval sDllToCall as String) as int
..
...
....
.....
end function
sDllToCall is either "dll1" or "dll2" being the NAME of the object that I
have to declare.
How can I use sDllToCall to declare an object?
If you for example look at it the other way around,
dim myobj as dll1
msgbox (myobj.toString) would give "dll1"
so maybe there is some function like myobj=sdlltocall.StringToObject or
something like this?
I don't know how to explain it more clearly.
"Cor Ligthert" <no**********@planet.nl> schreef in bericht
news:%2******************@tk2msftngp13.phx.gbl...
Albert,
After reading this 10 times I did not understand what you want and could
only give an answer as Mohamoss did.
dim sString as string="dll1"
dim myObj as sString <------ No good
You told how it works and this does not work, that is true, as Mohamoss
said.
And?
Cor