![]() |
How to make Excel the active application
I start a VBA macro in Excel. This macro is running several minutes.
During that time I open e.g. the Internet Explorer. When the VBA macro has finished it shows a MsgBox. Unfortunately I don't see this message box because Excel is not the avtive application at that time (the message box is behind the Internet Explorer). How can I make Excel the active application just after the VBA macro has finished so that I see the message box? Stefan |
How to make Excel the active application
i ran into this problem recently while trying to make excel play a midi
file - the windows media player would open & take the focus, and then not allow a msgbox to show. after much searching & reading previous postings in the newsgroup, it is my understanding that you can't force windows to put the focus on an inactive application........ it's not an excel issue, it's a windows issue. susan Stefan Mueller wrote: I start a VBA macro in Excel. This macro is running several minutes. During that time I open e.g. the Internet Explorer. When the VBA macro has finished it shows a MsgBox. Unfortunately I don't see this message box because Excel is not the avtive application at that time (the message box is behind the Internet Explorer). How can I make Excel the active application just after the VBA macro has finished so that I see the message box? Stefan |
How to make Excel the active application
see this thread............
http://groups.google.com/group/micro...cb7327b3b0c81a Stefan Mueller wrote: I start a VBA macro in Excel. This macro is running several minutes. During that time I open e.g. the Internet Explorer. When the VBA macro has finished it shows a MsgBox. Unfortunately I don't see this message box because Excel is not the avtive application at that time (the message box is behind the Internet Explorer). How can I make Excel the active application just after the VBA macro has finished so that I see the message box? Stefan |
How to make Excel the active application
this one contains a possible solution...........
http://groups.google.com/group/micro...29254bd9cd75dd Stefan Mueller wrote: I start a VBA macro in Excel. This macro is running several minutes. During that time I open e.g. the Internet Explorer. When the VBA macro has finished it shows a MsgBox. Unfortunately I don't see this message box because Excel is not the avtive application at that time (the message box is behind the Internet Explorer). How can I make Excel the active application just after the VBA macro has finished so that I see the message box? Stefan |
How to make Excel the active application
Give this a try...
Private Declare Function MessageBox Lib "user32" Alias "MessageBoxA" _ (ByVal hwnd As Long, ByVal lpText As String, _ ByVal lpCaption As String, ByVal wType As Long) As Long Sub DoItInFront() Dim MsgResponse As Long MsgResponse = MessageBox(hwnd:=0, lpText:="This is a Test", _ lpCaption:="Bring to Front", wType:=vbOKCancel + vbExclamation) End Sub -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "Stefan Mueller" wrote in message I start a VBA macro in Excel. This macro is running several minutes. During that time I open e.g. the Internet Explorer. When the VBA macro has finished it shows a MsgBox. Unfortunately I don't see this message box because Excel is not the avtive application at that time (the message box is behind the Internet Explorer). How can I make Excel the active application just after the VBA macro has finished so that I see the message box? Stefan |
All times are GMT +1. The time now is 07:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com