calling a function from a string

janz

Registered User.
Local time
Today, 23:14
Joined
Jan 25, 2008
Messages
44
Made (a cool:rolleyes:) database where I can simply switch from local html pages to online pages. The pages ref. is called from a table and works fine. The last option I want to put in is that I can also start a procedure from the same table

So the procedure instruction that I put in the table looks like : call:_<procedure name>
I strip away the call:_ and then I have the procedure name left.

But how do I now start the procedure from this string?
Tried several options with the <call> statement and docmd.openmodule etc.
But can't get it to work. It will not let me call the procedures from a string:(


I now made a fixed function where I jump to giving the <procedure name> and then with a case function jump to a fixed name. But I don't like it. Since every time when I make a new function I have to add it to the fixed one:eek:

Any proper sollutions?
 
You can try using the Eval function, but it will only call functions.

Something like:

Code:
Function MyTestFunction(strTest As String)

MsgBox strTest

End Function

Sub Test()

Dim strCall As String

strCall = "MyTestFunction(""It Worked!"")"
Eval (strCall)

End Sub
 
Kiwis Rule!!
Brilliant it works like a charm. Thanks a lot.
Great fun to that somebody from beautiful but far away NZ helps me in Holland.
Thanks again.
 

Users who are viewing this thread

Back
Top Bottom