Hello,
Is there a way to execute a macro in a formula ??
For example a need to execute a macro if the value in a cell is out of
range.
Many thanks for your help
Yves
Hello,
Is there a way to execute a macro in a formula ??
For example a need to execute a macro if the value in a cell is out of
range.
Many thanks for your help
Yves
Hi
not directly, you can however, put worksheet change code against the sheet
to read the result of the formula and run appropriate code, e.g.
------
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" And Target.Value < 4 Then
Application.EnableEvents = False
Call Macro1
Application.EnableEvents = True
End If
End Sub
-------
if you'ld like help implementing something along these lines, please post
back with additional information
--
Cheers
JulieD
check out www.hcts.net.au/tipsandtricks.htm
....well i'm working on it anyway
"Yves" <yves.nospam@invalid.org> wrote in message
news:d4b3gg$f0r$1@news.tiscali.fr...
> Hello,
> Is there a way to execute a macro in a formula ??
> For example a need to execute a macro if the value in a cell is out of
> range.
> Many thanks for your help
> Yves
>
>
>
Hi,
Many thanks for your answer, it works very well
Regards.
Yves
"JulieD" <JulieD@hctsReMoVeThIs.net.au> a écrit dans le message de news:
%23INLW00RFHA.1396@TK2MSFTNGP10.phx.gbl...
> Hi
>
> not directly, you can however, put worksheet change code against the sheet
> to read the result of the formula and run appropriate code, e.g.
> ------
> Private Sub Worksheet_Change(ByVal Target As Range)
>
> If Target.Address = "$A$1" And Target.Value < 4 Then
> Application.EnableEvents = False
> Call Macro1
> Application.EnableEvents = True
> End If
>
> End Sub
>
> -------
>
> if you'ld like help implementing something along these lines, please post
> back with additional information
>
> --
> Cheers
> JulieD
> check out www.hcts.net.au/tipsandtricks.htm
> ...well i'm working on it anyway
> "Yves" <yves.nospam@invalid.org> wrote in message
> news:d4b3gg$f0r$1@news.tiscali.fr...
>> Hello,
>> Is there a way to execute a macro in a formula ??
>> For example a need to execute a macro if the value in a cell is out of
>> range.
>> Many thanks for your help
>> Yves
>>
>>
>>
>
>
you're welcome and thanks for the feedback
"Yves" <yves.nospam@invalid.org> wrote in message
news:d4dms7$cqd$1@news.tiscali.fr...
> Hi,
> Many thanks for your answer, it works very well
> Regards.
> Yves
>
>
> "JulieD" <JulieD@hctsReMoVeThIs.net.au> a écrit dans le message de news:
> %23INLW00RFHA.1396@TK2MSFTNGP10.phx.gbl...
>> Hi
>>
>> not directly, you can however, put worksheet change code against the
>> sheet
>> to read the result of the formula and run appropriate code, e.g.
>> ------
>> Private Sub Worksheet_Change(ByVal Target As Range)
>>
>> If Target.Address = "$A$1" And Target.Value < 4 Then
>> Application.EnableEvents = False
>> Call Macro1
>> Application.EnableEvents = True
>> End If
>>
>> End Sub
>>
>> -------
>>
>> if you'ld like help implementing something along these lines, please post
>> back with additional information
>>
>> --
>> Cheers
>> JulieD
>> check out www.hcts.net.au/tipsandtricks.htm
>> ...well i'm working on it anyway
>> "Yves" <yves.nospam@invalid.org> wrote in message
>> news:d4b3gg$f0r$1@news.tiscali.fr...
>>> Hello,
>>> Is there a way to execute a macro in a formula ??
>>> For example a need to execute a macro if the value in a cell is out of
>>> range.
>>> Many thanks for your help
>>> Yves
>>>
>>>
>>>
>>
>>
>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks