I can hardly remember this post!
1 Apr 2002 02:35 PM
more than a year ago. lol
Ne way
i've learned a bit more since then and the key to your questions is this function:
CallByName
Yep, it does exactly what it says on the tin. Calls any function by it's name, which might not sound any good since you can call functions in VB. BUT, You could load code into a string and call it by line using the split function:
Dim strData() as string
Dim varArgs() as string
Dim i as long
Dim strText as string
strData = Split(strText, vbCrLf)
For i = 0 to uBound(strData)
'Execute
CallByName(FunctionClass, Left$(strData(i), vbMethod, varArgs)
Next i
That should do it, but you'll want to work on the variable coding to actually get them from the loaded code and not supply blank ones.
I haven't tested it so i've no idea if it'l work, but i'll run thru it ne way.
The variables are declared first (duh)
Then strData is sized (internally by the split command)
The split command then splits strText by the 'Carridge Return & Line Feed' (vbCrLf) and fills each split string into a seperate index of the variable (in order of course)
Then we start a for loop through the entire array
Each run we call the specified function (in the FunctionClass which will be a safe class with only the externally accessable variables and no real OOP)
Then the loop continues.
Im sure you can work in that. A tip is to use functions to create variables (actually have an array of a user-type with a name string and a variant variable)
Anything you don't understand post back here
Hope it helps!
[1]

-==-==---==-=--=-==-===--===-=-=-====----===--=--==-====-==---==-==-=-==-===--==[/b][/1]
[2]
"No trees were destroyed in the creation of this site, however, a significant number of electrons were terribly inconvenienced."
- [black]
Smile005[/black] :) (
[orange]Nexus005@yahoo.co.uk[/orange])[/b][/2][1]
Chat by MSN: [/1]
Nexus005@yahoo.co.uk[/b][/1],
My new site:
[orange]Marc Pritchard[/orange][/b],
My joke site:
[orange]www.rofljokes.co.uk[/orange][/b]