Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
function wizard on office 2003 | Excel Worksheet Functions | |||
where is the function wizard in excell?? | Excel Worksheet Functions | |||
Function Wizard | Excel Discussion (Misc queries) | |||
Excel function wizard categories | Excel Programming | |||
Adding a category to the Function Wizard | Excel Programming |