ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check box - checked or unchecked? (https://www.excelbanter.com/excel-programming/307424-check-box-checked-unchecked.html)

Greg Billinge

Check box - checked or unchecked?
 
Hi,

I have a check box (eg: checkbox1), That, when checked i want to run some
code i already have. When it is unchecked i want it to run some different
code.

Any help is much appreciated.

Many thanks

Greg

Greg Billinge

Check box - checked or unchecked?
 
Sorry, this refers to the check box from the control toolbox.

I am using excel 2003

"Greg Billinge" wrote:

Hi,

I have a check box (eg: checkbox1), That, when checked i want to run some
code i already have. When it is unchecked i want it to run some different
code.

Any help is much appreciated.

Many thanks

Greg


Norman Jones

Check box - checked or unchecked?
 
Hi Greg,

Private Sub CheckBox1_Click()
If CheckBox1 Then
Macro1
Else
Macro2
End If
End Sub

Replace Macro1 and Macro2 with your macro names.

---
Regards,
Norman



"Greg Billinge" wrote in message
...
Hi,

I have a check box (eg: checkbox1), That, when checked i want to run some
code i already have. When it is unchecked i want it to run some different
code.

Any help is much appreciated.

Many thanks

Greg





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

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