Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Leith
I appreaciate your help :-) though it does not what I try to do. When I activate my timer in Excel so that the progressbar form will be shown in 5 seconds and schwitch to another application - then after 5 seconds Excel bring itselves in front and the userform comes on top of it all. That is not what I want. I want Excel to stay in background, updating whatever and here my problem is with the userform with progress bar. Normally when the user works in Excel, the user schould be informed that something is going on (userform with progressbar). Then - when the user schwitches to another application, Excel schould continue its scheduled automatic refreshing.. and here - I want the userform with bar not to come on top... at the same time the code schould continue.. updating the userform and progressbar - in background. What happends when modal is that code stops, and Excel icon on my taskbar is blinking. When I then activate Excel, the userform comes up.... It have been - "waited" for my action... It schould have continued itself. Hope it is understandable. :-) Cheers Leon On 8 Jul., 18:39, Leith Ross wrote: Hello Leon, I should have proof read my post. I changed the GetActiveWindow in my original routine to GetForegroundWindow because the latter has s slightly higher priority and has proven to be more stable across different Windows systems. the code should be this... '================================================= ======== 'Returns the Window Handle of the Window 'that is accepting User input. Public Declare Function GetForegroundWindow Lib "user32.dll" () As Long Sub KeepFormOnTop() Const HWND_TOPMOST As Long = -1 Const SWP_NOMOVE As Long = &H2 Const SWP_NOSIZE As Long = &H1 SetWindowPos GetForegroundWindow(), HWND_TOPMOST, 0, 0, 0, 0, _ SWP_NOMOVE + SWP_NOSIZE End Sub '================================================= ======== -- Leith Ross Sincerely, Leith Ross 'The Code Cage' (http://www.thecodecage.com/) ------------------------------------------------------------------------ Leith Ross's Profile:http://www.thecodecage.com/forumz/member.php?userid=75 View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=113600 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form question | Excel Discussion (Misc queries) | |||
Form Question | Excel Programming | |||
Form Question | Excel Programming | |||
Form Question | Excel Programming | |||
ser form question | Excel Programming |