ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Check Box to call Macro (https://www.excelbanter.com/excel-programming/338753-check-box-call-macro.html)

John

Check Box to call Macro
 
Could someone help me understand why if I click my check box it doesn't call
or run my macro... here is the code.

Private Sub CheckBox1_Click()
If CheckBox = True Then
Application.Run "Bond Price Calculator.xlt!GovtClick"
'or call GovtClick
Else: End
End If
End Sub

Doug Glancy

Check Box to call Macro
 
John,

In your code, change "CheckBox" to "CheckBox1":

CheckBox1 = True Then

hth,

Doug

"John" wrote in message
...
Could someone help me understand why if I click my check box it doesn't

call
or run my macro... here is the code.

Private Sub CheckBox1_Click()
If CheckBox = True Then
Application.Run "Bond Price Calculator.xlt!GovtClick"
'or call GovtClick
Else: End
End If
End Sub




John

Check Box to call Macro
 
Thats a little embarrising... THANKS!

"Doug Glancy" wrote:

John,

In your code, change "CheckBox" to "CheckBox1":

CheckBox1 = True Then

hth,

Doug

"John" wrote in message
...
Could someone help me understand why if I click my check box it doesn't

call
or run my macro... here is the code.

Private Sub CheckBox1_Click()
If CheckBox = True Then
Application.Run "Bond Price Calculator.xlt!GovtClick"
'or call GovtClick
Else: End
End If
End Sub






All times are GMT +1. The time now is 12:08 PM.

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