ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   checkbox with two macros (https://www.excelbanter.com/excel-programming/373227-checkbox-two-macros.html)

Jose Carlos

checkbox with two macros
 
Hello

I have a doubt

How set two conditional macros on a checkbox? For example if the checkbox A
is clicked will be executed the Macro A if not then will be executed the
Macro B.

How can set this?

Best Regards

Jose Carlos

Norman Jones

checkbox with two macros
 
Hi Jose,

Try something like:

'=============
Private Sub CheckBox1_Click()
If Me.CheckBox1.Value = True Then
Call macroA
Else
Call macroB
End If
End Sub
'<<=============

---
Regards,
Norman



"Jose Carlos" <Jose wrote in message
...
Hello

I have a doubt

How set two conditional macros on a checkbox? For example if the checkbox
A
is clicked will be executed the Macro A if not then will be executed the
Macro B.

How can set this?

Best Regards

Jose Carlos





All times are GMT +1. The time now is 10:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com