hi,
can any one help me, i have a message box and i have a link to my website in the text, is there any way in which this text can become a hyperlink, so people can click on it and go to my site ?
Thanks
Merlin ?
Printable View
hi,
can any one help me, i have a message box and i have a link to my website in the text, is there any way in which this text can become a hyperlink, so people can click on it and go to my site ?
Thanks
Merlin ?
Can't think of any way to actually put the Hyperlink in the messagebox, but you can either build your own form or have the browser start when the user clicks OK on the messagebox.
Code is as follows:
Dim FileName As String, Dummy As String
Dim BrowserExec As String * 255
Dim RetVal As Long
Dim FileNumber As Integer
Const SW_SHOWNORMAL = 1
Sub Link_Click()
BrowserExec = Space(255)
FileName = App.Path & "\temphtm.HTM"
FileNumber = FreeFile() ' Get unused file number
Open FileName For Output As #FileNumber ' Create temp HTML file
Write #FileNumber, " <\HTML>" ' Output text
Close #FileNumber ' Close file
' Then find the application associated with it.
RetVal = FindExecutable(FileName, Dummy, BrowserExec)
BrowserExec = Trim$(BrowserExec)
' If an application is found, launch it!
If RetVal <= 32 Or IsEmpty(BrowserExec) Then ' Error
MsgBox "Could not find browser.", vbCritical, "HyperPad"
Else
RetVal = ShellExecute(MDIForm1.hwnd, "open", BrowserExec, "www.realisticgraphics.com", Dummy, SW_SHOWNORMAL)
If RetVal <= 32 Then
MsgBox "Webpage could not be opened.", vbCritical, "HyperPad"
End If
End If
Kill FileName
End Sub