ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to run or not run a second Macro (https://www.excelbanter.com/excel-programming/318197-macro-run-not-run-second-macro.html)

Darin Kramer

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!

Ron de Bruin

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!




Frank Kabel

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!




All times are GMT +1. The time now is 02:34 PM.

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