tobyhutton1234
New Member
- Joined
- Dec 21, 2010
- Messages
- 24
Hi
I'm trying to work out how to insert a hyperlink using vba.
I have a form where a user will enter theor username.
Once they enter their username and clicked ok it will apper in the cell where the box appers.
Heres my code sao far.
CamUser is the name of the textbox. I need the text to display in the cell to say (whatever their username) and a link to take them to a website.
Any ideas thanks.
I'm trying to work out how to insert a hyperlink using vba.
I have a form where a user will enter theor username.
Once they enter their username and clicked ok it will apper in the cell where the box appers.
Heres my code sao far.
Code:
Private Sub CommandButton1_Click()
If Len(Me.CamUser & "") = 0 Then
MsgBox "You enter your username before you continue.", vbInformation + vbOnly, "Username"
Cancel = True
Exit Sub
Else
ActiveCell.Value = ("http://website.com/default.asp?ID=" & CamUser)
Unload Me
End If
End Sub
Any ideas thanks.