Hi evrybody,
I have an interesting question. I have an Excel workbook with only one Excel sheet on which I created a commandbutton. My intention is to generate an activeX control checkbox on the same Excel sheet after this command button is clicked and then check this checkbox PROGRAMMATICALLY. The former task of creating an activeX control checkbox is sucessfully done but I don't know how to come up with a solution for the latter.
The associated click event VBA code done so far for this command button is as follow:
Private Sub CommandButton1_Click()
Dim mybox As New OLEObject
'create CheckBox
Set mybox = ActiveSheet.OLEObjects.Add(<WBR>ClassType:="forms.CheckBox.1")
'specify geometric properties
With mybox
.Left = 380
.Top = 29
.Width = 100
.Height = 18
End With
'?????????????????????????????
'how to check the created checkbox PROGRAMMATICALLY???
'???????????????????????????<WBR>??
End Sub
Can anyone give me a hand???
Thank you very much in advance,
I have an interesting question. I have an Excel workbook with only one Excel sheet on which I created a commandbutton. My intention is to generate an activeX control checkbox on the same Excel sheet after this command button is clicked and then check this checkbox PROGRAMMATICALLY. The former task of creating an activeX control checkbox is sucessfully done but I don't know how to come up with a solution for the latter.
The associated click event VBA code done so far for this command button is as follow:
Private Sub CommandButton1_Click()
Dim mybox As New OLEObject
'create CheckBox
Set mybox = ActiveSheet.OLEObjects.Add(<WBR>ClassType:="forms.CheckBox.1")
'specify geometric properties
With mybox
.Left = 380
.Top = 29
.Width = 100
.Height = 18
End With
'?????????????????????????????
'how to check the created checkbox PROGRAMMATICALLY???
'???????????????????????????<WBR>??
End Sub
Can anyone give me a hand???
Thank you very much in advance,