C
Claireyscott
Hello,
Can someone help me, I am trying to create a macro in excel that allows me
to create a copy of a worksheet, clear its contents then hyperlink it to a
particular cell.
The problem is that I want it to link a different page to a different cell
every time i.e. create sheet 2(3) and link to R3. create sheet 2(4) link to
cell R4, but I can only make it so that it creates the copy, deletes the
contents and the links cell R2 with Sheet 2(2), at the moment the coding
looks like this:
Sheets("Sheet2").Select
Sheets("Sheet2").Copy Before:=Sheets(2)
Sheets("Sheet1").Select
Range("R2").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Sheet2 (2)'!A1"
What would I need to add or change to make it do what I want to?'
I can send you the spreadsheet complete with macro if you need me to.
Love Claire
Can someone help me, I am trying to create a macro in excel that allows me
to create a copy of a worksheet, clear its contents then hyperlink it to a
particular cell.
The problem is that I want it to link a different page to a different cell
every time i.e. create sheet 2(3) and link to R3. create sheet 2(4) link to
cell R4, but I can only make it so that it creates the copy, deletes the
contents and the links cell R2 with Sheet 2(2), at the moment the coding
looks like this:
Sheets("Sheet2").Select
Sheets("Sheet2").Copy Before:=Sheets(2)
Sheets("Sheet1").Select
Range("R2").Select
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:="", SubAddress:= _
"'Sheet2 (2)'!A1"
What would I need to add or change to make it do what I want to?'
I can send you the spreadsheet complete with macro if you need me to.
Love Claire