dynamic variablename

Results 1 to 2 of 2

Thread: dynamic variablename

  1. #1
    fred Guest

    Default dynamic variablename

    Hi, I wonder if it is possible to create a dynamic variablename. For example I want to loop and create a variable for every time I loop. Something like this:<BR><BR>For i = 1 TO Ubound(temparr)<BR><BR>"var" & i = temparr(i) &#039;variablename = var1,var2,var3,etc.<BR><BR>Next<BR><BR>I know it is possible if you want to put values in session<BR>Session("var" & i) = i<BR>I just don´t get i to work with normal variables.<BR><BR>Thanks in advance!

  2. #2
    Aquarius Guest

    Default RE: dynamic variablename

    You can&#039;t dynamically create statements and have them automatically executed. What you need to have a look at is Eval and Execute and ExecuteGlobal, which allow you to execute arbitrary strings as code.<BR><BR>Aq.<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts