Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all,
I seem to be having with my simple code below. I'm creating a new worksheet with range from old worksheet and want to rename the new worksheet with a cell value from old worksheet but am getting an error. can anyone help? For Each sh In ThisWorkbook.Worksheets 'Bold section headings sh.Range("A2,A4").Font.Bold = True 'Make second worksheet Set Newsh = ThisWorkbook.Worksheets.Add sh.Range("A23:G95").Cut _ Destination:=Newsh.Range("a1") sh.Range("A:g").Copy Newsh.Range("a:g").PasteSpecial Paste:=xlPasteFormats Newsh.Name = sh.Range("A2").Value (ERROR HERE) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to name worksheet tabs using a cell within the worksheet? | Excel Discussion (Misc queries) | |||
Macro error when worksheet is protected | Excel Discussion (Misc queries) | |||
Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error | Excel Discussion (Misc queries) | |||
run time error 1004 on protected worksheet when I try to run macro | Excel Programming | |||
Help Please! Macro Error on Select Worksheet | Excel Programming |