Message Box to float on top of Explorer instead of Excel ?

mphansen

New Member
Joined
Jun 23, 2002
Messages
45
I have some command bar macros tied to website hyperlinks. When one of the command bars is selected, the macro opens the website in Internet Explorer. Each website has specific Logins & Passwords. I've inserted a Message box for each macro that details the specific Login/Password when selected - however the message box appears behind Explorer in Excel.

Any ideas of how I can have the Message box appear "on top" of Explorer ? Thoughts appreciated - Mark

The Sub Web1()
'
' web Macro
' Macro recorded 10/31/2002 by me04518
'
Range("F5").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
MsgBox("login= ###, password= ###")
End Sub
 

Some videos you may like

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Howdy Mark, the following worked well for me, creating an independant window. Also, I removed the selection from your code:

<pre>
Sub Web1()
[f5].Hyperlinks(1).Follow
CreateObject("WScript.Shell").Popup _
"login= ###, password= ###", , "Critical Info"
End Sub</pre>

Incidentally, the blank term is a time-out term in terms of seconds (closes itself). Hope this helps.
 

mphansen

New Member
Joined
Jun 23, 2002
Messages
45
Hey NateO - it worked - but how do I keep the pop-up docked on top of the website until I click OK ? With your advice now, it launches on top of Explorer but if I click anywhere on explorer - the pop-up minimizes to the start bar.

Mark
 

NateO

Legend
Joined
Feb 17, 2002
Messages
9,700
Howdy Mark, let's try going Modal on the end-user:<pre>
Sub Web1()
[f5].Hyperlinks(1).Follow
CreateObject("WScript.Shell").Popup _
"login= ###, password= ###", , "Critical Info", vbSystemModal
End Sub</pre><pre></pre>
Hope this helps.

_________________
Cheers,<font size=+2><font color="red"> Nate<font color="blue"> Oliver</font></font></font>
This message was edited by NateO on 2002-11-07 19:39
 

mphansen

New Member
Joined
Jun 23, 2002
Messages
45
NateO - worked like a charm - thanks for your help !

Separately, I have what I believe is an Application.FileSearch related question & will repost that question under separate topic heading. Would you mind taking a look at that one if you're still around later.

Thanks again for your help on these earlier posts - Mark
 

Watch MrExcel Video

Forum statistics

Threads
1,127,988
Messages
5,627,996
Members
416,286
Latest member
ko15

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top