View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
NickHK NickHK is offline
external usenet poster
 
Posts: 4,391
Default Variable type Confusion

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

"D Zandveld" wrote in message
...
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