Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "The Vision Thing" wrote in message ... Is there a VBA equivalent of ASP's 'Execute' command. I'd like to use such a command to dynamically declare variables at run-time. Here's a sample of ASP 'Execute' code. --------------------------- varID = fp_rs("ID") varName = fp_rs("Name") varOccupation = fp_rs("Occupation") for i = 1 to numFields Execute("var" & arr_fieldnames(i) & " = fp_rs(""" & arr_fieldnames(i) & """)" next --------------------------- Thanks, Wayne C. I think Application.Evaluate is what you are looking for. /Fredrik |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Fredrik Wahlgren" wrote in message ... "The Vision Thing" wrote in message ... Is there a VBA equivalent of ASP's 'Execute' command. I'd like to use such a command to dynamically declare variables at run-time. Here's a sample of ASP 'Execute' code. --------------------------- varID = fp_rs("ID") varName = fp_rs("Name") varOccupation = fp_rs("Occupation") for i = 1 to numFields Execute("var" & arr_fieldnames(i) & " = fp_rs(""" & arr_fieldnames(i) & """)" next --------------------------- Thanks, Wayne C. I think Application.Evaluate is what you are looking for. /Fredrik I don't think Application.Evaluate solves the problem. I want to dynamically declare variables and assign values like so:- For i = 1 to Ubound(arrIn) Dim ("var" & i) as string ("var" & i) = arrIn(i) Next Regards, Wayne C. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I execute command from button or hyperlink? | Excel Discussion (Misc queries) | |||
Command button - won't execute twice in sequence | Excel Programming | |||
Programming command button to execute on a different worksheet | Excel Programming | |||
Execute a menu command with VBA? | Excel Programming | |||
Execute a command line app but i want a string returned. | Excel Programming |