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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Syntax Query

Status
Not open for further replies.

PBS2

Programmer
May 17, 2004
43
GB
Can you please help with a VB.NET syntax question? Say you had 50 controls on your form called txt1 to txt50 which you wanted to disable. In Visual Foxpro you can use something called macro substitution in your code to help with this as follows:-

FOR i = 1 TO 50
STORE LTRIM(STR(i,4)) TO n && convert numeric to string
.txt&n.enabled = .F. && disable txt1 to txt50
NEXT

Is there any equivalent in VB.NET?? (the setting of .enable isn't important, it's the reference to the control name I'm after).

Many thanks
 
Check out this thread: thread796-1028699

I used to rock and roll every night and party every day. Then it was every other day. Now I'm lucky if I can find 30 minutes a week in which to get funky. - Homer Simpson
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top