Hello Everyone,
Could someone help me clean up the code below? I am selecting cells, and I think that could be avoided.
What this does is inserts a hyperlink in N46 that points to another worksheet in the same workbook. Then it copies the formatting from the cell above.
Dim TbName As String
Dim ClntName As String
TbName = Sheets("Controls").Range("O46").Value
ClntName = Sheets("Controls").Range("N46").Value
With Worksheets("Controls")
.Range("N46").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'" & TbName & "'!Template", TextToDisplay:=ClntName
Range("N45").Select
Selection.Copy
Range("N46").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End With
I have started the cleanup, but I am not sure how to deal with the hyperlink statement and the formatting statment.
Thanks for your help.
Bookmarks