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

Can i use for loop here? or array? 2

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
585
PH
Hi everyone.... may i just ask if i could use array or for to shorten these commands? If so, please show me how... with a little explanation to help me understand.... Thanks and God bless....

PROCEDURE text19.click()

IF this.parent.text19.value = 1

this.parent.text6.value = 1
this.parent.text7.value = 1
this.parent.text8.value = 1
this.parent.text9.value = 1
this.parent.text10.value = 1
this.parent.text11.value = 1
this.parent.text12.value = 1
this.parent.text13.value = 1
this.parent.text14.value = 1
this.parent.text15.value = 1
this.parent.text16.value = 1
this.parent.text17.value = 1
this.parent.text18.value = 1
ELSE

this.parent.text6.value = 0
this.parent.text7.value = 0
this.parent.text8.value = 0
this.parent.text9.value = 0
this.parent.text10.value = 0
this.parent.text11.value = 0
this.parent.text12.value = 0
this.parent.text13.value = 0
this.parent.text14.value = 0
this.parent.text15.value = 0
this.parent.text16.value = 0
this.parent.text17.value = 0
this.parent.text18.value = 0
this.parent.text19.value = 0
thisform.Refresh()

ENDIF
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top