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!

Referring to control boxes

Status
Not open for further replies.

jluft

Technical User
May 4, 2004
74
US
Private Sub StandardReportComponents_Click()
TempArray = Array("", "Portfolio", "Query1", "Query2", "Query3", "Query4", "Query5")
TempArray2 = Array("", "Toggle", "SortDropDown_Portfolio", "ColumnSpecs", "Toggle_Trade", "TradeDisplay", "Toggle_SubBanks", "Toggle_FASB", "Toggle_SecClass", "Toggle_SecCategory")

For GenericLoop = 1 To UBound(TempArray)
For GenericLoopB = 1 To UBound(TempArray2)
CurrentControlBox = TempArray2(GenericLoopB) & "_" & TempArray(GenericLoop)
CurrentControlBox.Value = True
Next GenericLoopB
Next GenericLoop

End Sub


when referring to the first value that this loop pulls, "Toggle_Portfolio", the code reads
Toggle_Portfolio.value = true

if i replace
CurrentControlBox.value = true with
Toggle_Portfolio.value = true

the code executes properly

but when referring to the text that i have stored to refer to the name of the control box, it does not

what am i doing wrong??
thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top