2007 - is it possible to set a hyperlink in a msgbox??


R

rick

With the following MsgBox:
Call MsgBox("This application requires Microsoft Excel 2007. " _
& vbCrLf & "" _
& vbCrLf & "You must install the Microsoft Office
Compatibility Pack " _
& "in order to use 2007 Microsoft Office documents in
Office XP, Office 2003, and Office 2000. Click on the following link to
visit the Microsoft website that explains the requirements and procedure to
install the compatibility pack." _
& vbCrLf & "" _
& vbCrLf & "http://support.microsoft.com/kb/924074" _
& vbCrLf & "" _
& vbCrLf & "This application will now shut down." _
, vbCritical Or vbSystemModal, "Incompatible Version of
Excel")

Is it possible or must I use a Userform?

Thanks.

Rick
 
Ad

Advertisements

G

Gary''s Student

You don't need a MsgBox. If you put a TextBox (from the Drawing toolbar) on
a worksheet and enter a hyperlink as text, the hyperlink will be active. The
can be done either with VBA or manually.
 
D

Dave Peterson

You're going to have to use a userform--

Or maybe you could add a button (ok/cancel???) and use cancel for the hyperlink
(you'll have to add that to the instructions (and the text won't look like a
hyperlink):

Option Explicit
Sub testme()

Dim resp As Long
resp = MsgBox(prompt:="This application requires Microsoft Excel 2007." _
& vbNewLine & vbNewLine & "Hit cancel to follow hyperlink", _
Buttons:=vbOKCancel)

If resp = vbCancel Then
ThisWorkbook.FollowHyperlink _
Address:="http://support.microsoft.com/kb/924074"
End If

End Sub

(or maybe you can just always follow the hyperlink????)

Option Explicit
Sub testme()

MsgBox prompt:="This application requires Microsoft Excel 2007.", _
Buttons:=vbOKOnly

ThisWorkbook.FollowHyperlink _
Address:="http://support.microsoft.com/kb/924074"

End Sub
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top