Hi guys
I have put together a basic reports userform, and have been tasked with including a hyperlink option to upload engineering reports.
I havefound a nice bit of code which I have adapted to suit my needs, but it only inserts the hyperlink in an Active cell.
Try as I might, I cat get it to insert the hyperlink into iRow, 8, which is the cell on the worksheet it would be required.
The hyperlink code I have been working in is below.
To find the relevant report-
Private Sub CommandButton1_Click()
Dim FileName As String
FileName = Application.GetOpenFilename()
TextBox1.Value = FileName
TextBox1.SetFocus
End Sub
Then to add the hyperlink-
Private Sub CommandButton2_Click()
'OK - ADD HYPERLINK TO ACTIVE CELL
With ActiveCell
If Not .Hyperlinks Is Nothing Then
.Hyperlinks.Add Anchor:=ActiveCell, Address:=TextBox1.Text
End If
End With
End Sub
Any help much appreciated
Maggie
Bookmarks