Say I have an EXCEL 97 spreadsheet set up with numerous checkbox
controls, cb_1, cb_2 etc ... I'd like to be able to write a procedure
which takes the name of the checkbox and sets it value to 1. The
checkboxes are on the sheet not a userform so I don't appear to be
able to access a controls collection to do what I want. Any help is
appreciated.
e.g what I want is something like:-
' calling procedure
private sub setallchecks()
for i ....
setcheck "cb_" & str(i)
next
end sub
'called procedure
private sub setcheck(cb as string)
'here I want to set the value of the checkbox identified by cb to 1
end sub
controls, cb_1, cb_2 etc ... I'd like to be able to write a procedure
which takes the name of the checkbox and sets it value to 1. The
checkboxes are on the sheet not a userform so I don't appear to be
able to access a controls collection to do what I want. Any help is
appreciated.
e.g what I want is something like:-
' calling procedure
private sub setallchecks()
for i ....
setcheck "cb_" & str(i)
next
end sub
'called procedure
private sub setcheck(cb as string)
'here I want to set the value of the checkbox identified by cb to 1
end sub