Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 309
Default 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
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
why do i "sometimes" need to "edit chart object" before "source da Flirty and Blonde Charts and Charting in Excel 1 February 2nd 10 02:07 PM
Error Help - Method "Range" of object "_Worksheet" failed. Alan Smith Excel Programming 3 March 15th 07 06:55 PM
What is Error "Method "Paste" of object "_Worksheet" failed? vat Excel Programming 7 February 17th 06 08:05 PM
error with userform, "unable to create embedded object" Jeff Excel Programming 4 November 1st 05 07:44 PM
excel should "paste special" a "conditional formatting" lozturk21 Excel Programming 0 October 23rd 05 02:15 PM


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