P
pieterklinker
Hi,
For testing purposes i want to control a workbook from another workbook
with vba.
When setting a checkbox to 'checked', the macro assigned to the
checkbox is not executed.
the code i use is:
Dim name As String
Dim cbo As CheckBox
name = "some value read from a cell'
Set cbo = otherWorkbook.ActiveSheet.CheckBoxes(name)
cbo.value = 1 'make checkbox 'checked'
In similar code for buttons i use: Run button.OnAction, this does not
work for a checkbox though. Also i can't get the name of the macro from
the checkbox in vba.
Does anyone know how i can get the macro assigned to a checkbox to
execute from vba? Note that i don't know the macro name in the code,
only the name of the checkbox.
thanks
Pieter
For testing purposes i want to control a workbook from another workbook
with vba.
When setting a checkbox to 'checked', the macro assigned to the
checkbox is not executed.
the code i use is:
Dim name As String
Dim cbo As CheckBox
name = "some value read from a cell'
Set cbo = otherWorkbook.ActiveSheet.CheckBoxes(name)
cbo.value = 1 'make checkbox 'checked'
In similar code for buttons i use: Run button.OnAction, this does not
work for a checkbox though. Also i can't get the name of the macro from
the checkbox in vba.
Does anyone know how i can get the macro assigned to a checkbox to
execute from vba? Note that i don't know the macro name in the code,
only the name of the checkbox.
thanks
Pieter