usign a variable to make a call() (1 Viewer)

bloody_football

Registered User.
Local time
Today, 14:20
Joined
Sep 8, 2004
Messages
70
using a variable to make a call()

I would like to make a call() based on the variable name.

So far I have -
Code:
temp = "d" & Session("where")
If temp = "d51" then Response.Write "Hello"
Call temp()

If the variable is 51 then I will get the output "hello" but the call won't work; my error is
Microsoft VBScript runtime error '800a000d'

Type mismatch


James
 
Last edited:

bloody_football

Registered User.
Local time
Today, 14:20
Joined
Sep 8, 2004
Messages
70
'END IF' is not needed if you do the 'IF ... THEN' on the one line of code.

I did get an answer from another forum -
Code:
EXECUTE "CALL " & temp
That works fine :)
 

Users who are viewing this thread

Top Bottom