C
Craig in NJ
This seems a stupid question, but from VBA code within Excel how do I
force my Excel spreadsheet window to the top? I've hunted very hard in
newsgroup archives & the web but can't find a solution that actually
works. For example, I thought this should work, but it doesn't:
Application.WindowState = xlMaximized
Application.ShowWindowsInTaskbar = True
Application.Visible = True
AppActivate Application.name
My application name is, of course, "Microsoft Excel".
The context is that my Excel spreadsheet's VBA code opens a webbrowser
( Dim IEwindow as SHDocVw.InternetExplorer ),
does a lot of work with that browser (visible=true), and periodically I
want to be able to force the Excel spreadsheet to be the top window
again so the user can see the progress of filling in the spreadsheet.
The IEwindow somehow stays on top.
FWIW, I'd be almost as satisified if I could minimize the IEbrowser
window without making it invisible (the user needs to be able to access
it if necessary), but I can't find any examples on how to do that
either.
Craig in NJ
force my Excel spreadsheet window to the top? I've hunted very hard in
newsgroup archives & the web but can't find a solution that actually
works. For example, I thought this should work, but it doesn't:
Application.WindowState = xlMaximized
Application.ShowWindowsInTaskbar = True
Application.Visible = True
AppActivate Application.name
My application name is, of course, "Microsoft Excel".
The context is that my Excel spreadsheet's VBA code opens a webbrowser
( Dim IEwindow as SHDocVw.InternetExplorer ),
does a lot of work with that browser (visible=true), and periodically I
want to be able to force the Excel spreadsheet to be the top window
again so the user can see the progress of filling in the spreadsheet.
The IEwindow somehow stays on top.
FWIW, I'd be almost as satisified if I could minimize the IEbrowser
window without making it invisible (the user needs to be able to access
it if necessary), but I can't find any examples on how to do that
either.
Craig in NJ