A few days ago I wanted to add a button to a sheet to activate a Hyperlink to a file on my computer. FDibbins responded and the result is fine. I wanted to add some more buttons on the same sheet to open different files but I can't get them to work. I first copied the code changed the target and nothing. I then tried adding a separate module and that doesn't work either. The only thing I have been able to return is a "Run-Time error '-2147221014(80040lea)' ". IS is possible to do this and if so how do I go about it. Here is the code I have.
Private Sub CommandButton1_Click()
Dim strURL As String
strURL = Worksheets("Select Customer").Range("C7").Value ' change Sheet1 to the name of the worksheet that the formula is in
ThisWorkbook.FollowHyperlink strURL
End Sub
Thanks.
Jim O
Bookmarks