The direct answer is NO . MsgBox does not allow hyperlinks, just text.
So here is a workaround that should work fine.
Set objShell = CreateObject("Wscript.Shell") intMessage = MsgBox("Sorry, but you have an out-of-date database version. Please redownload via the batch file to ensure that you have the latest version. Contact the administrator of this database or your manager if you need help." & vbCr _ & vbCr _ & "Your current database version is " & CurrentVer & " which may be out of date. The current database version prescribed on the network share is " & FileVer & ". They must match in order for you to proceed." & vbCr _ & vbCr _ & "Would you like to learn more about CSC self-help instructions on how to reload the most current version of the PRF Intake Tool to your computer?", _ vbYesNo, "There is a problem...") If intMessage = vbYes Then objShell.Run ("http://www.OurSite.com/online/Solutions/Search_Results.asp?opsystem=7&keywords=PRF+Intake+Tool&Category=") Else Wscript.Quit End If
If the underline style is a requirement, then you should just create your own custom form, as described in http://j-walk.com/ss/excel/tips/tip71.htm . Here are the steps:
- Add a
Label object and enter your message - Make the label blue (
ForeColor ) and underlined ( Font ) so that it looks like a typical hyperlink. - Set the Label
MousePointer to 99 - fmMousePointerCustom - Specify the cursor file for the Label
MouseIcon (if you have one). Double-click the shortcut and create a Click event routine. Here is an example code:
Private Sub Label1_Click() Link = "http://www.YOUR_SITE.com" On Error GoTo NoCanDo ActiveWorkbook.FollowHyperlink Address:=Link, NewWindow:=True Unload Me Exit Sub NoCanDo: MsgBox "Cannot open " & Link End Sub
To create a mail to hyperlink, use this operator:
Link = "mailto: someone@somewhere.com "
source share