Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Check if within Function Wizard

If you have a User Defined Function that requires a long time to
evaluate, the use of the Function Wizard could be really annoying as
it recalculates at every key stroke.

A way to avoid it is to check if the following function at the
beginning of each of your UDF.

------------------------------------------------------------
Function InsideWizard() As Boolean
Dim ActiveWndHandle As Long
Dim ParentWndHandle As Long
Dim ActiveWndProcessId As Long
Dim ParentWndProcessId As Long
Dim Result As Long

ActiveWndHandle = GetActiveWindow()
If ActiveWndHandle = 0 Then Exit Function
ParentWndHandle = GetParent(ActiveWndHandle)
If ParentWndHandle = 0 Then
InsideWizard = False
Exit Function
End If

Result = GetWindowThreadProcessId(ActiveWndHandle,
ActiveWndProcessId)
Result = GetWindowThreadProcessId(ParentWndHandle,
ParentWndProcessId)
If ParentWndProcessId = ActiveWndProcessId Then InsideWizard =
True Else InsideWizard = False
End Function
---------------------------------------------------------------
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
function wizard on office 2003 mikeallen77 Excel Worksheet Functions 1 August 15th 07 04:10 AM
where is the function wizard in excell?? Sara Excel Worksheet Functions 1 May 26th 06 04:52 PM
Function Wizard GolfGal Excel Discussion (Misc queries) 8 March 20th 05 07:25 PM
Excel function wizard categories Jim[_31_] Excel Programming 0 November 5th 03 05:09 PM
Adding a category to the Function Wizard Henry Scarberry Excel Programming 4 July 11th 03 01:59 PM


All times are GMT +1. The time now is 07:06 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"