Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 397
Default Macro to run or not run a second Macro



Howdie!

I need to run a macro that, depending on the result in a cell, runs
another Macro (second macro is just a hide of a column)

So for example, when the user runs Macro 1 it needs to check the value
in Cell A1. If A1 = Yes, then run Macro number 2. If the value in a1 =
No, then dont run any Macros and the first macro can be stopped.

Any ideas?

Thanks and Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Macro to run or not run a second Macro

Hi Darin

Use this

Sub macro1()
If Sheets("sheet1").Range("A1").Value = "Yes" Then
macroname
End If
End Sub

Sub macroname()
MsgBox "H1"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Darin Kramer" wrote in message ...


Howdie!

I need to run a macro that, depending on the result in a cell, runs
another Macro (second macro is just a hide of a column)

So for example, when the user runs Macro 1 it needs to check the value
in Cell A1. If A1 = Yes, then run Macro number 2. If the value in a1 =
No, then dont run any Macros and the first macro can be stopped.

Any ideas?

Thanks and Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Macro to run or not run a second Macro

Hi
see your other post

--
Regards
Frank Kabel
Frankfurt, Germany

"Darin Kramer" schrieb im Newsbeitrag
...


Howdie!

I need to run a macro that, depending on the result in a cell, runs
another Macro (second macro is just a hide of a column)

So for example, when the user runs Macro 1 it needs to check the

value
in Cell A1. If A1 = Yes, then run Macro number 2. If the value in a1

=
No, then dont run any Macros and the first macro can be stopped.

Any ideas?

Thanks and Regards

Darin

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
macro to delete entire rows when column A is blank ...a quick macro vikram Excel Programming 4 May 3rd 04 08:45 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


All times are GMT +1. The time now is 06:32 PM.

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"