realniceguy5000
Board Regular
- Joined
- Aug 19, 2008
- Messages
- 148
Hi, Could someone advise what is wrong with this script below? All I'm looking to do is link the cell on sheets(1) to the cell on sheets(5) so when a user clicks the cell they go right to sheets(5) and the correct cell.
Thank You, Mike
Thank You, Mike
Code:
A = Sheets(1).Range("D65000").End(xlUp).Address
mynum = Sheets(1).Range("D65000").End(xlUp).Value + 1
B = Sheets(5).Range("A65000").End(xlUp).Offset(49, 0).Address
Range(B).Value = mynum
Sheets(1).Select
Range(A).Offset(1, 0).Select
tolink = Sheets(5).Range(B).Address
fromlink = Sheets(1).Range(A).Offset(1, 0).Address
With Worksheets(1)
.Hyperlinks.Add Anchor:=.Range(fromlink), Address:="", SubAddress:=tolink, TextToDisplay:=mynum
End With