ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking a Document in a Messagebox (https://www.excelbanter.com/excel-programming/385959-linking-document-messagebox.html)

[email protected]

Linking a Document in a Messagebox
 
Hi,

I would like to write a link to a document in a message box.

Instead of writing

MsgBox "For more detailed help go to http://www.help.com/"

I would like to have a link in the message box that points to "http://
www.help.com/"

Is this possible and how does it work?


Bob Flanagan

Linking a Document in a Messagebox
 
Its not possible within a message box. Use a userform with a button on it
that says "go to ___" and code that takes one to the page when the button is
clicked. If you need such code, just post for it.

Bob Flanagan
Macro Systems
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel

wrote in message
ups.com...
Hi,

I would like to write a link to a document in a message box.

Instead of writing

MsgBox "For more detailed help go to http://www.help.com/"

I would like to have a link in the message box that points to "http://
www.help.com/"

Is this possible and how does it work?




Helmut Weber[_2_]

Linking a Document in a Messagebox
 
Hmm...

Sub test()
Dim l As Long
Dim v As Variant
l = MsgBox("see http://www.help.com/ for help", 3)
If l = 6 Then
v = Shell("c:\program files\internet explorer\iexplore.exe
http://www.help.com/", vbMaximizedFocus)
End If
End Sub

Beware of linebreakes by the newsreader.
Though I'd like to know, how to use
a running instance of iExplore,
if there is one.
Must be possible.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"


Helmut Weber[_2_]

Linking a Document in a Messagebox
 
Without shell something like:

Dim IE As New InternetExplorer
With IE
.Visible = True
.Navigate ("http://www.help.com/")
End With

Reference to Microsoft Internet Controls assumed.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

[email protected]

Linking a Document in a Messagebox
 
Thank for your Help.

Helmut, I used the code from your second post and it works fine.


Dave Peterson

Linking a Document in a Messagebox
 
One mo

Option Explicit
Sub testme()
Dim resp As Long
resp = MsgBox(Prompt:="whateveryouwant", Buttons:=vbOKCancel)

If resp = vbOK Then
ThisWorkbook.FollowHyperlink "http:\\www.help.com"
End If
End Sub


wrote:

Hi,

I would like to write a link to a document in a message box.

Instead of writing

MsgBox "For more detailed help go to http://www.help.com/"

I would like to have a link in the message box that points to "http://
www.help.com/"

Is this possible and how does it work?


--

Dave Peterson


All times are GMT +1. The time now is 10:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com