Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special modeless "Userform" object....
I know this is far-fetched, but is there any way to create a
modeless Userform that stays visible somewhere on the desktop even when the Excel application is minimized on the taskbar??? Thank you everyone! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special modeless "Userform" object....
I don't think so, but you make the application's visible property False - ie
hide excel "Robert Crandal" wrote: I know this is far-fetched, but is there any way to create a modeless Userform that stays visible somewhere on the desktop even when the Excel application is minimized on the taskbar??? Thank you everyone! . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special modeless "Userform" object....
' be sure to show the form as modeless, eg in normal module
' UserForm1.Show vbModeless Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SetWindowLongA Lib "user32" _ (ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Private Const GWL_HWNDPARENT As Long = -8 Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindow("ThunderDFrame", Me.Caption) SetWindowLongA hWnd, GWL_HWNDPARENT, 0& End Sub Search this group if you want to put minimize/restore buttons in the caption. Regards, Peter T "Robert Crandal" wrote in message ... I know this is far-fetched, but is there any way to create a modeless Userform that stays visible somewhere on the desktop even when the Excel application is minimized on the taskbar??? Thank you everyone! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Special modeless "Userform" object....
Wow, that code works great..... thanx soooo much
"Peter T" <peter_t@discussions wrote in message ... ' be sure to show the form as modeless, eg in normal module ' UserForm1.Show vbModeless Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function SetWindowLongA Lib "user32" _ (ByVal hWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Private Const GWL_HWNDPARENT As Long = -8 Private Sub UserForm_Initialize() Dim hWnd As Long hWnd = FindWindow("ThunderDFrame", Me.Caption) SetWindowLongA hWnd, GWL_HWNDPARENT, 0& End Sub Search this group if you want to put minimize/restore buttons in the caption. Regards, Peter T "Robert Crandal" wrote in message ... I know this is far-fetched, but is there any way to create a modeless Userform that stays visible somewhere on the desktop even when the Excel application is minimized on the taskbar??? Thank you everyone! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
why do i "sometimes" need to "edit chart object" before "source da | Charts and Charting in Excel | |||
Error Help - Method "Range" of object "_Worksheet" failed. | Excel Programming | |||
What is Error "Method "Paste" of object "_Worksheet" failed? | Excel Programming | |||
error with userform, "unable to create embedded object" | Excel Programming | |||
excel should "paste special" a "conditional formatting" | Excel Programming |