Macro to be used in any cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I make a macro available in any cell of a worksheet.
I created it in a cell, but I want to be able to use it in any cell. Thanks.

Range("L1058").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
"..\..\..\Customer Filing\"
Range("L1058").Select
Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True
Range("C1").Select
Application.CommandBars("Stop Recording").Visible = True
End Sub
 
Try reducing it to just:

ActiveSheet.Hyperlinks.Add Anchor:=Selection, _
Address:="..\..\..\Customer Filing\"
Selection.Hyperlinks(1).Follow _
NewWindow:=False, AddHistory:=True

Regards

Trevor
 
Back
Top