Would you like to create a hyperlink to your
favourite website on a form using VBA?
Open a new project in VBA and insert a new Userform.
Add a label to the form and change the caption to the URL of your website.
Change the colour of the label to Blue - Underlined.
Now add the following coding to the click event of the label :
'<- Coding Starts Here
Private Sub Label1_Click()
Dim nFile As Integer
'Write a temp file URL
nFile = FreeFile
Open "TEMP.URL" For Output As #nFile
Print #nFile, "[InternetShortcut]"
Print #nFile, "URL=http://www.afralisp.com"
'Launch the browser
Shell "rundll32.exe shdocvw.dll,OpenURL " & "\temp.url",
'Delete the temp file
' Coding Ends Here
Voila, you have a hyperlink on your form.