Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting if a userform is loaded
Is there a test to detect if a userform has been loaded
into memory? Thanks, Seth |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting if a userform is loaded
Hi Seth,
If userform1 is nothing then msgbox "Form Not Loaded" Or If not userform1 is nothing then msgbox "Form Is Loaded" -- John johnf202 at hotmail dot com "Seth" wrote in message ... Is there a test to detect if a userform has been loaded into memory? Thanks, Seth |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Detecting if a userform is loaded
as soon as you reference Userform1 in your code, if it isn't loaded, it gets
loaded. So Johns code would always show it is loaded. You can check the userforms collection Sub tester4() Dim bLoaded as boolean Dim frm 'Load UserForm1 For Each frm In UserForms If UCase(frm.Name) = UCase("UserForm1") Then MsgBox "Userform1 is loaded" bLoaded = True Exit For End If Next If Not bLoaded Then MsgBox "Userform1 is not loaded" End If End Sub Run as is, then Uncomment Load UserForm1 -- Regards, Tom Ogilvy jaf wrote in message ... Hi Seth, If userform1 is nothing then msgbox "Form Not Loaded" Or If not userform1 is nothing then msgbox "Form Is Loaded" -- John johnf202 at hotmail dot com "Seth" wrote in message ... Is there a test to detect if a userform has been loaded into memory? Thanks, Seth |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Add-In appears to be loaded, but isn't ... | Excel Discussion (Misc queries) | |||
Why do I still get "#NAME?" when I have loaded the Analysis Toolp. | Excel Worksheet Functions | |||
Determining if a Add-In has been loaded from XLSTART | Excel Programming | |||
Determining if a Add-In has been loaded from XLSTART | Excel Programming | |||
How to hide a loaded .xls...? | Excel Programming |