Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel VBA is there a way to detect with the API if an Excel userform
is hidden or visible? There is no problem to get the Window handle, but I can't figure this out. Have tried with a few GetWindow... API's, but no success sofar. As the code is in one workbook and the userform is in another I can't do this easily with VBA. RBS |
#2
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
On Thu, 30 Jun 2005 21:25:48 +0100, "RB Smissaert"
wrote: In Excel VBA is there a way to detect with the API if an Excel userform is hidden or visible? There is no problem to get the Window handle, but I can't figure this out. Have tried with a few GetWindow... API's, but no success sofar. As the code is in one workbook and the userform is in another I can't do this easily with VBA. IsWindowVisible should do it: Public Declare Function IsWindowVisible Lib "user32" _ (ByVal hWnd As Long) As Long If IsWindowVisible(hwndFrm) < 0 Then '...its visible... End If -Tom MVP - Visual Basic (please post replies to the newsgroup) |
#3
![]()
Posted to microsoft.public.vb.winapi,microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, nice and simple and it exactly does the job.
RBS "Tom Esh" wrote in message ... On Thu, 30 Jun 2005 21:25:48 +0100, "RB Smissaert" wrote: In Excel VBA is there a way to detect with the API if an Excel userform is hidden or visible? There is no problem to get the Window handle, but I can't figure this out. Have tried with a few GetWindow... API's, but no success sofar. As the code is in one workbook and the userform is in another I can't do this easily with VBA. IsWindowVisible should do it: Public Declare Function IsWindowVisible Lib "user32" _ (ByVal hWnd As Long) As Long If IsWindowVisible(hwndFrm) < 0 Then '...its visible... End If -Tom MVP - Visual Basic (please post replies to the newsgroup) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Workbook Open but not visible (and not HIDDEN?!?) | Excel Discussion (Misc queries) | |||
Userform always visible | Excel Programming | |||
Making sheets visible / hidden | Excel Programming | |||
Visible Sheet Showing When Hidden | Excel Programming | |||
Check status row (hidden or visible)? | Excel Programming |