Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embeddding a macro in Logical IF stmt
Hi
I am trying to embed a macro in a logical IF statement in the true result. Is this even possible, and if so how Thanks for your help! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embeddding a macro in Logical IF stmt
Hi
Do you mean a IF statement in a formula or in code? -- Regards Ron de Bruin http://www.rondebruin.nl "Ron" wrote in message ... Hi, I am trying to embed a macro in a logical IF statement in the true result. Is this even possible, and if so how? Thanks for your help! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embeddding a macro in Logical IF stmt
Ron,
I guess that you mean a worksheet IF. You can, but the things that macro can do are limited. It would need to be a function, and it can return a value, but it cannot change any properties of the cell/worksheet. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Ron" wrote in message ... Hi, I am trying to embed a macro in a logical IF statement in the true result. Is this even possible, and if so how? Thanks for your help! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Embeddding a macro in Logical IF stmt
Hi ron
You posted private that you use it in a formula Try to use the calculate event in the Sheet module This example will run the macro "YourMacroName" If the formula cell B1 display a value higher then 10 Private Sub Worksheet_Calculate() If Me.Range("b1").Value 10 Then YourMacroName Else 'do nothing End If End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Ron de Bruin" wrote in message ... Hi Do you mean a IF statement in a formula or in code? -- Regards Ron de Bruin http://www.rondebruin.nl "Ron" wrote in message ... Hi, I am trying to embed a macro in a logical IF statement in the true result. Is this even possible, and if so how? Thanks for your help! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
LOOKUP or IF-THEN stmt - which one? | Excel Worksheet Functions | |||
If Stmt with two colors | Excel Worksheet Functions | |||
Getting error using if then else stmt | Excel Worksheet Functions | |||
Rounding down from .9 in an IF stmt | Excel Worksheet Functions | |||
URGENT need help with if/then stmt. | Excel Worksheet Functions |