Variable type Confusion

G

Guest

I have a series of 13 check boxes (CheckBox1...CheckBox13) which hide columns
based on thier value.

They are included in Sheet4, and are set as:

Private Sub CheckBox10_Click()

End Sub

I have an overall report formatting function which sets the report format.

Problem is, I can't pass the value of the checkbox back to the public
function in order to activate the column hide function.

i assume I need to assign the value of the checkbox in each Private
function, and set the assigned value as public, but can anyone advise on this
please?

Thanks
 
N

NickHK

You mean like this ?

Private Sub CheckBox1_Click()
MsgBox Clicked(CheckBox1)
End Sub

Private Sub CheckBox2_Click()
MsgBox Clicked(CheckBox2)
End Sub

Private Sub CheckBox3_Click()
MsgBox Clicked(CheckBox3)
End Sub

Public Function Clicked(WhichCheckBox As MSForms.CheckBox) As String
Clicked = WhichCheckBox.Caption
End Function

NickHK
 
B

Bob Phillips

See your later thread.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

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

Similar Threads


Top