Macro to be used in any cell

D

Diane

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
 
T

Trevor Shuttleworth

Try reducing it to just:

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

Regards

Trevor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top