crazyboybert
Programmer
Hi Guys,
I want to assign vaues to consecutively numbered variables using a for loop. the code i have a t the moment is
i have ten variables dim dob1 to dob10. they may or may not have a value. if they dont i wish to set them to "n/a". I tried using eval() as you would in javascript but this didnt work. If i run the code as it is above i get an expected statement error on the line
"dob" & count = "n/a"
any help with this greatly appreciated
cheers
rob
I want to assign vaues to consecutively numbered variables using a for loop. the code i have a t the moment is
Code:
for count = 1 to 10
if eval("dob" & count) = "" then
"dob" & count = "n/a"
end if
next
i have ten variables dim dob1 to dob10. they may or may not have a value. if they dont i wish to set them to "n/a". I tried using eval() as you would in javascript but this didnt work. If i run the code as it is above i get an expected statement error on the line
"dob" & count = "n/a"
any help with this greatly appreciated
cheers
rob