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
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