Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

initialize variables in a for loop

Status
Not open for further replies.

mleduc

Programmer
Dec 5, 2001
20
CA
Hi yesterday I post a message to know how create variables in a for loop.

Now my problem is that I want to put a string in those variables but could not figure it how???

here what I tried

For i = 1 to 60
If eval(&quot;x&quot; & i) <> &quot;&quot; Then
execute &quot;Dim y&quot; & i
execute &quot;y&quot; & i = &quot;String&quot; << stop here
End if
Next

Error return
Microsoft VBScript runtime error '800a000d'

Type mismatch: 'execute'

Help please
 
I'm able to creat the variables with the line of code

execute &quot;Dim x&quot; & i

What I'm having trouble with is to but a simple constant string in these new variables.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top