Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have Excel checking a file every so often for a particular command,
and whenever it finds a certain command, I want it to bring Excel to the front and prompt the user. Similarly, I would like to be able to send Excel to the back whenever some other command was inside a file. How could I achieve this? Any help would be appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't think you can do this. The closest you can come is to use
AppActivate Application.Caption This will cause the Excel icon in the Taskbar to blink, but won't actually make the application active. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "R Avery" wrote in message ... I have Excel checking a file every so often for a particular command, and whenever it finds a certain command, I want it to bring Excel to the front and prompt the user. Similarly, I would like to be able to send Excel to the back whenever some other command was inside a file. How could I achieve this? Any help would be appreciated. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "R Avery" wrote in message ... I have Excel checking a file every so often for a particular command, and whenever it finds a certain command, I want it to bring Excel to the front and prompt the user. Similarly, I would like to be able to send Excel to the back whenever some other command was inside a file. How could I achieve this? Any help would be appreciated. It can be done using the win32 API In a code module declare the function Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal Wflags As Long) As Long then get the Excel Windows handle Dim Winhandle as Long Winhandle=Application.Hwnd Then call the following sub FloatWindow(Winhandle) Public Sub Floatwindow(Winhandle As Long) ' ------------------------------------- ' This routine makes the window who's ' handle is passed always on top ' ------------------------------------- Dim Wflags As Integer Wflags = 2 Or 1 Call SetWindowPos(Winhandle, -1, 0, 0, 0, 0, Wflags) End Sub Keith ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Make hyperlink to open another application that default one | Links and Linking in Excel | |||
how to make Excel application GUI look better? | Excel Discussion (Misc queries) | |||
VBA: Make Excel the active application | Excel Discussion (Misc queries) | |||
How to make Excel feel switching application? | Excel Programming | |||
Does anyone know how to programmatically disable Application.xlcut | Excel Programming |