Control to functions.

P

Pieter Halkema

I am working on a Macro that involves several checkbox´s. I am looking for a way to send a specific control to a function.

i.e. on a double click on a checkbox: I send the checkbox to a funcion. The function changes the checkbox´s name and tag.
I use the funcion for all the checkbox´s and I only have to call it up from the double_click command.

Something like

Private Sub CheckBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
ChangeName( ThisCheckBox )
End Sub


Function ChangeName ( Alpha as Control )
Alpha.Caption = "It Worked"
Alpha.Tag = Alpha.Tag + 1
end Function


Also how does on put Checkbox names into a Matrix using Excel 2000 Visual Basic editor. <---- not very important
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top