I want to exclude certain custom calculations calculating when I use the VBA
worksheet calculate event (i.e. Activesheet.Calculate) on custom functions.
Is this possible?
Thanks in advance
I want to exclude certain custom calculations calculating when I use the VBA
worksheet calculate event (i.e. Activesheet.Calculate) on custom functions.
Is this possible?
Thanks in advance
This seemed to work in simple testing. Maybe you can enhance it:
Option Explicit
Public StopCalc As Boolean
Function myFunc() As Variant
Application.Volatile True
If StopCalc Then
myFunc = Application.Caller.Text
Exit Function
Else
myFunc = Now
End If
End Function
Sub testme01()
StopCalc = True
ActiveSheet.Calculate
StopCalc = False
End Sub
Sub testme02()
ActiveSheet.Calculate
End Sub
Geoff wrote:
>
> I want to exclude certain custom calculations calculating when I use the VBA
> worksheet calculate event (i.e. Activesheet.Calculate) on custom functions.
> Is this possible?
>
> Thanks in advance
--
Dave Peterson
Thanks - Had .value which did not work.
"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
news:42B0259D.7C51E2A3@netscapeXSPAM.com...
> This seemed to work in simple testing. Maybe you can enhance it:
>
> Option Explicit
> Public StopCalc As Boolean
> Function myFunc() As Variant
> Application.Volatile True
> If StopCalc Then
> myFunc = Application.Caller.Text
> Exit Function
> Else
> myFunc = Now
> End If
> End Function
> Sub testme01()
> StopCalc = True
> ActiveSheet.Calculate
> StopCalc = False
> End Sub
> Sub testme02()
> ActiveSheet.Calculate
> End Sub
>
>
>
>
> Geoff wrote:
>>
>> I want to exclude certain custom calculations calculating when I use the
>> VBA
>> worksheet calculate event (i.e. Activesheet.Calculate) on custom
>> functions.
>> Is this possible?
>>
>> Thanks in advance
>
> --
>
> Dave Peterson
You may have gotten a faster response if you had shared your code and indicated
what didn't work.
Geoff wrote:
>
> Thanks - Had .value which did not work.
>
> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
> news:42B0259D.7C51E2A3@netscapeXSPAM.com...
> > This seemed to work in simple testing. Maybe you can enhance it:
> >
> > Option Explicit
> > Public StopCalc As Boolean
> > Function myFunc() As Variant
> > Application.Volatile True
> > If StopCalc Then
> > myFunc = Application.Caller.Text
> > Exit Function
> > Else
> > myFunc = Now
> > End If
> > End Function
> > Sub testme01()
> > StopCalc = True
> > ActiveSheet.Calculate
> > StopCalc = False
> > End Sub
> > Sub testme02()
> > ActiveSheet.Calculate
> > End Sub
> >
> >
> >
> >
> > Geoff wrote:
> >>
> >> I want to exclude certain custom calculations calculating when I use the
> >> VBA
> >> worksheet calculate event (i.e. Activesheet.Calculate) on custom
> >> functions.
> >> Is this possible?
> >>
> >> Thanks in advance
> >
> > --
> >
> > Dave Peterson
--
Dave Peterson
True. I was trying different methods with one even being an iteration
process to find, but this was not optimal. Thanks again and will do next
time.
"Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
news:42B0B327.DBED0246@netscapeXSPAM.com...
> You may have gotten a faster response if you had shared your code and
> indicated
> what didn't work.
>
> Geoff wrote:
>>
>> Thanks - Had .value which did not work.
>>
>> "Dave Peterson" <ec35720@netscapeXSPAM.com> wrote in message
>> news:42B0259D.7C51E2A3@netscapeXSPAM.com...
>> > This seemed to work in simple testing. Maybe you can enhance it:
>> >
>> > Option Explicit
>> > Public StopCalc As Boolean
>> > Function myFunc() As Variant
>> > Application.Volatile True
>> > If StopCalc Then
>> > myFunc = Application.Caller.Text
>> > Exit Function
>> > Else
>> > myFunc = Now
>> > End If
>> > End Function
>> > Sub testme01()
>> > StopCalc = True
>> > ActiveSheet.Calculate
>> > StopCalc = False
>> > End Sub
>> > Sub testme02()
>> > ActiveSheet.Calculate
>> > End Sub
>> >
>> >
>> >
>> >
>> > Geoff wrote:
>> >>
>> >> I want to exclude certain custom calculations calculating when I use
>> >> the
>> >> VBA
>> >> worksheet calculate event (i.e. Activesheet.Calculate) on custom
>> >> functions.
>> >> Is this possible?
>> >>
>> >> Thanks in advance
>> >
>> > --
>> >
>> > Dave Peterson
>
> --
>
> Dave Peterson
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks