I have an old program that I am working to upgrade. The old language was based on VB but was proprietary from what I understand. I am now using VBScript built into the application I am customizing.
In the old app, I had the following loop written to loop through 12 controls and assign values.
for i = 1 to 12
setpropertyof "txtAlloc" & cStr(i), "Text", ""
next i
The names of the 12 controls were 'txtAlloc1,' 'txtAlloc2,' 'txtAlloc3,' etc....
This would loop through them all and set the Text property to blank for all of them. Simple.
Moving to VBScript, I need to accomplish the same thing. I don't have the option of using a control array in the app I am using. Also, I have to do this sort of thing soooo many times, I can't have 12 IF statements every time I need to do it.
Does anyone have any suggestions on the syntax to perform the same functionality in VBScript?
Thanks for any help!
In the old app, I had the following loop written to loop through 12 controls and assign values.
for i = 1 to 12
setpropertyof "txtAlloc" & cStr(i), "Text", ""
next i
The names of the 12 controls were 'txtAlloc1,' 'txtAlloc2,' 'txtAlloc3,' etc....
This would loop through them all and set the Text property to blank for all of them. Simple.
Moving to VBScript, I need to accomplish the same thing. I don't have the option of using a control array in the app I am using. Also, I have to do this sort of thing soooo many times, I can't have 12 IF statements every time I need to do it.
Does anyone have any suggestions on the syntax to perform the same functionality in VBScript?
Thanks for any help!