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

excel vba and checkboxes 2

Status
Not open for further replies.

taupirho

Programmer
Jun 25, 2002
680
GB
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top