Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert worksheet string name to date format in cell Sabosis Excel Worksheet Functions 2 September 4th 09 05:49 PM
String error on closing worksheet Lee Jeffery Excel Discussion (Misc queries) 6 September 20th 06 01:20 PM
Formatting a pivot worksheet to display a string at the end! matpj Charts and Charting in Excel 1 January 12th 06 10:36 AM
building a text string while looping though a worksheet Phillips Excel Programming 4 December 10th 03 08:31 AM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"