stevefisher85
New Member
- Joined
- Jan 14, 2016
- Messages
- 5
Hello,
Wondering if anyone can help me? I have a UserForm that contains a number of text boxes. One of those text boxes contains a URL. I want to find a way I can either double click the text box, or click a command button, which will open Internet Explorer and navigate to the URL contained within the textbox.
I have searched and found the below code which people say is working for them but is bugging for me at the .HyperlinkAddress = Me!txtURL line
Any help on this would be appreciated. Thanks
Wondering if anyone can help me? I have a UserForm that contains a number of text boxes. One of those text boxes contains a URL. I want to find a way I can either double click the text box, or click a command button, which will open Internet Explorer and navigate to the URL contained within the textbox.
I have searched and found the below code which people say is working for them but is bugging for me at the .HyperlinkAddress = Me!txtURL line
Code:
Private Sub cmdGo_Click()
Dim ctl As CommandButton
Set ctl = Me!cmdGo
If Len(ctl & vbNullString) > 0 Then
With ctl
.HyperlinkAddress = Me!txtURL
.Hyperlink.Follow
End With
End If
End Sub
Any help on this would be appreciated. Thanks