LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Calling a macro from an If statement

I want to run a macro based on one or both value(s) of 2
checkboxes else I want to skip the macro. If chkbx1 is
TRUE, I want to skip the macro. If chkbx2 is TRUE, I want
to skip to skip the macro. If chkbx1 and chkbx2 are both
TRUE, I want to skip the macro.

This is what I have and it is not working (E6 and E7 are
the cells linked to the checkbox controls....

Sub test()
Worksheets("Data").Select
Range("E6").Select
If E6 = "TRUE" Then
Worksheets("Form").Select
Range("A4:I4").Select
ElseIf E7 = "TRUE" Then
Worksheets("Form").Select
Range("A4:I4").Select
Else
mcrSaveAs
End If

End Sub

Thanks for any advice you may have!
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calling macro in a formula rk0909 Excel Discussion (Misc queries) 2 March 14th 06 04:15 PM
calling a dll from excel macro Stefan[_4_] Excel Programming 1 December 12th 03 12:16 AM
calling a macro from within a loop Rick[_12_] Excel Programming 1 July 30th 03 11:52 PM
calling a macro from within a loop Mike Hughes Excel Programming 0 July 30th 03 08:50 PM
Calling macro in add-in. Clark B Excel Programming 1 July 24th 03 11:05 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"