Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Value as String as Worksheet Name
Currently using this macro to save copy of sheet in same book.
What am wanting to do if possible, is take the value from cell b3, a copy is created and use it for the new sheet name. Looked at multipl postings and haven't been able to find something specific to this. An help would be appreciated. Sub SaveCopy() ' ' SaveCopy Macro ' Sheets("Summary").Select Sheets("Summary").Copy Befo=Sheets(1) ActiveSheet.Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("A1").Select Sheets("Summary").Select End Su -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Value as String as Worksheet Name
Hi Darrel,
Sub SaveCopy() ' ' SaveCopy Macro ' Sheets("Summary").Copy Befo=Sheets(1) with ActiveSheet .Cells.Copy .Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False .Name = .Range("B3").Value Enhd With WorkSheets("Summary").Select End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Darrel " wrote in message ... Currently using this macro to save copy of sheet in same book. What am wanting to do if possible, is take the value from cell b3, as copy is created and use it for the new sheet name. Looked at multiple postings and haven't been able to find something specific to this. Any help would be appreciated. Sub SaveCopy() ' ' SaveCopy Macro ' Sheets("Summary").Select Sheets("Summary").Copy Befo=Sheets(1) ActiveSheet.Select Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("A1").Select Sheets("Summary").Select End Sub --- Message posted from http://www.ExcelForum.com/ |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Value as String as Worksheet Name
Can get it name the sheet if cell referencing is text. However, the cel
contains date imported from csv file in format of 5/3/2004 the one summary being copied has all the formulas to build a dail summary based on input from cms. Am thinking that maybe the actual date will need to be reassemble somehow? Can select cell and copy, then manually rename the sheet with pastin it in. Would be nice if it can be done via VBA during the sheet cop process. Hope this clarifies, thank you for responding earlier -- Message posted from http://www.ExcelForum.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cell Value as String as Worksheet Name
Hi Darrel,
How about this then Sub SaveCopy() ' ' SaveCopy Macro ' Sheets("Summary").Copy Befo=Sheets(1) with ActiveSheet .Cells.Copy .Cells.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False .Name = Format(.Range("B3").Value, ""yyyy-mm-dd") End With WorkSheets("Summary").Select End Sub -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Darrel " wrote in message ... Can get it name the sheet if cell referencing is text. However, the cell contains date imported from csv file in format of 5/3/2004 the one summary being copied has all the formulas to build a daily summary based on input from cms. Am thinking that maybe the actual date will need to be reassembled somehow? Can select cell and copy, then manually rename the sheet with pasting it in. Would be nice if it can be done via VBA during the sheet copy process. Hope this clarifies, thank you for responding earlier. --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Convert worksheet string name to date format in cell | Excel Worksheet Functions | |||
String error on closing worksheet | Excel Discussion (Misc queries) | |||
Formatting a pivot worksheet to display a string at the end! | Charts and Charting in Excel | |||
building a text string while looping though a worksheet | Excel Programming | |||
Create a formula into a String then assign string to a cell | Excel Programming |