Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Kav Kav is offline
external usenet poster
 
Posts: 1
Default Conditional Macro

I have a macro which is assigned to a control box or button. However I do not
want the macro to run if a value is entered in another cell in the worksheet.
Eg

if Cell A1 has a drop down list and if "Apply Mannually" is chosen then the
macro should not run if teh user accidentally presses the control box button

How can I do this
--
Kav
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Conditional Macro

Private Sub commandButton1_Click()
if Range("A1").Value = "Apply Manually" then exit sub

' current code

End Sub

--
Regards,
Tom Ogilvy


"Kav" wrote:

I have a macro which is assigned to a control box or button. However I do not
want the macro to run if a value is entered in another cell in the worksheet.
Eg

if Cell A1 has a drop down list and if "Apply Mannually" is chosen then the
macro should not run if teh user accidentally presses the control box button

How can I do this
--
Kav

Reply
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
conditional sum macro [email protected] Excel Programming 5 March 20th 06 07:48 PM
[B]Conditional Macro?[/B] Heydilbert Excel Discussion (Misc queries) 1 November 11th 05 10:07 PM
conditional sum and macro Francine Otterson Excel Discussion (Misc queries) 1 June 22nd 05 09:44 AM
conditional macro eofeapr Excel Programming 4 April 3rd 05 10:41 AM
Conditional Macro Shelley Shepherd via OfficeKB.com Excel Worksheet Functions 1 February 1st 05 05:32 PM


All times are GMT +1. The time now is 06:47 AM.

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

About Us

"It's about Microsoft Excel"