Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
rename worksheet
I want to rename a worksheet using a name in a cell - the problem is then how
to refer to that sheet on the codeeg: Dim sname As String sname = Range("A2") Sheets("QUOTE").Name = sname Range("B7").Select ActiveCell.FormulaR1C1 = "=sname!R[-4]C[-2]" etc..... it renames the sheet but when it runs the last name it cant find sname - is the problem my syntax? Thanks, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
rename worksheet
You need to separate the sname variable from the fixed text
Dim sname As String sname = Range("A2") Sheets("QUOTE").Name = sname Range("B7").FormulaR1C1 = "=" & sname & "!R[-4]C[-2]" -- HTH Bob Phillips "Ciara" wrote in message ... I want to rename a worksheet using a name in a cell - the problem is then how to refer to that sheet on the codeeg: Dim sname As String sname = Range("A2") Sheets("QUOTE").Name = sname Range("B7").Select ActiveCell.FormulaR1C1 = "=sname!R[-4]C[-2]" etc..... it renames the sheet but when it runs the last name it cant find sname - is the problem my syntax? Thanks, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
rename worksheet
Thank you.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't rename worksheet | Excel Discussion (Misc queries) | |||
Using information from one worksheet, to rename inserted worksheet | Excel Worksheet Functions | |||
why can't I rename my worksheet? | Excel Discussion (Misc queries) | |||
rename worksheet | Excel Discussion (Misc queries) | |||
Rename worksheet | Excel Programming |