PDA

Click to See Complete Forum and Search --> : Calling Procedures


colm.leavy
Jan 10th, 2000, 06:20 PM
I read strings from a file. These strings are procedure names.
How do I get VB6 to call the function that is represented by the string I just read from the file?
Any ideas appreciated.

Fox
Jan 10th, 2000, 06:33 PM
I had a problem similar to this and I had the following solution:

1)
Make your little script language and with a big Select Case switch trough your functions.
(That's what I finally did)

2)
Make a dll in C and then use the API function to execute a function from a dll ;)

------------------
Fox
gigotz@gmx.net
http://gigotz.tsx.org
...
The truth is somewhere out there...

colm.leavy
Jan 10th, 2000, 06:53 PM
Thanks but C is out of the question and I was really hoping to avoid the case statement, it's not really dynamic and means that the code has to be added to if you want to expand.

I appreciate the response.

Crazy D
Jan 10th, 2000, 07:43 PM
check out the VB 6 function CallByName
Haven't used it, but maybe it does the trick for you.

colm.leavy
Jan 10th, 2000, 09:44 PM
Thanks alot, that did the job. I wasn't expecting to get that going till tomorrow.

Clunietp
Jan 11th, 2000, 12:25 AM
I answered in the other forum in case you still need it:
http://www.vb-world.net/ubb/Forum3/HTML/002581.html

colm.leavy
Jan 11th, 2000, 12:29 AM
I saw that, thanks very much.

Fox
Jan 11th, 2000, 04:22 AM
I can't know everything ;)

------------------
Fox
gigotz@gmx.net
http://gigotz.tsx.org
...
Every program can be reduced to one instruction which doesn't work.