excel - Disable checkboxes when sheet opened in vba -


i have 3 checkboxes. when user opened sheet, he/she must not check checkboxes. want them disabled. how can that?

not sure if meant activex or formcontrol, here go

code

private sub worksheet_activate()   dim myactivex object   set myactivex = sheet1.oleobjects("checkbox1")   myactivex.object.value = true   myactivex.object.locked = false ' make false if wish enable   myactivex.object.enabled = false ' option disable    dim myformcontrol checkbox   set myformcontrol = activesheet.shapes("check box 1").oleformat.object   myformcontrol.value = true   myformcontrol.enabled = false ' make true if wish enable end sub 

live gif demo enter image description here


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -