Thanks for you reply but it is still not working, below is what i ahve changed Text Boxes 10,11 and 12 too, is it correct or have I done something wrong?
Code:
Private Sub TextBox10_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim R As Long
Dim lTB As Long
lTB = 10
R = CLng(RowNumber)
Set Data = Worksheets("Data Form")
' There must be a row number and the user must left click with the mouse.
If R <> 0 And Len(Me.Controls("TextBox" & lTB).Text) > 0 Then
On Error Resume Next
Data.Cells(R, lTB).Hyperlinks(1).Follow True
If Err <> 0 Then MsgBox "Unable to open '" & Data.Cells(R, lTB).Value & "'."
On Error GoTo 0
End If
End Sub
Private Sub TextBox11_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim R As Long
Dim lTB As Long
lTB = 11
R = CLng(RowNumber)
Set Data = Worksheets("Data Form")
' There must be a row number and the user must left click with the mouse.
If R <> 0 And Len(Me.Controls("TextBox" & lTB).Text) > 0 Then
On Error Resume Next
Data.Cells(R, lTB).Hyperlinks(1).Follow True
If Err <> 0 Then MsgBox "Unable to open '" & Data.Cells(R, lTB).Value & "'."
On Error GoTo 0
End If
End Sub
Private Sub TextBox12_DblClick(ByVal Cancel As MSForms.ReturnBoolean)
Dim R As Long
Dim lTB As Long
lTB = 12
R = CLng(RowNumber)
Set Data = Worksheets("Data Form")
' There must be a row number and the user must left click with the mouse.
If R <> 0 And Len(Me.Controls("TextBox" & lTB).Text) > 0 Then
On Error Resume Next
Data.Cells(R, lTB).Hyperlinks(1).Follow True
If Err <> 0 Then MsgBox "Unable to open '" & Data.Cells(R, lTB).Value & "'."
On Error GoTo 0
End If
End Sub
Bookmarks