#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Saving a worksheet

Currently when the user uses a macro I save a copy of the workbook with the
sheet name imbedded in the workbook name. This is to indicate to me what
sheet the user was editing when the macro was run. example below:
workbook name saved as Sales 09-2009 (sheet1).xls.

Is there a way just to save the sheet they were working on. It would have to
be copied as values for this save only so I think I would have to first copy
the sheet to a new sheet as values. And then After the saving has completed
I would want the new sheet deleted from the workbook.

I hope I made myself clear enough on this if not I will give better detail.


--
Thank You in Advance
Ed Davis


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Saving a worksheet

The macro recorder is your friend. I just recorded this
Sub Macro15()
'
' Macro15 Macro
' Macro recorded 9/27/2009 by Donald B. Guillett
'

'
Sheets("Sheet19").Select
Sheets("Sheet19").Move
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\personal\mynewbookname.xls",
FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ed Davis" wrote in message
...
Currently when the user uses a macro I save a copy of the workbook with
the sheet name imbedded in the workbook name. This is to indicate to me
what sheet the user was editing when the macro was run. example below:
workbook name saved as Sales 09-2009 (sheet1).xls.

Is there a way just to save the sheet they were working on. It would have
to be copied as values for this save only so I think I would have to first
copy the sheet to a new sheet as values. And then After the saving has
completed I would want the new sheet deleted from the workbook.

I hope I made myself clear enough on this if not I will give better
detail.


--
Thank You in Advance
Ed Davis


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 67
Default Saving a worksheet

Thank you Don
After making recording it myself and making a few changes it is just what I
was looking to do.
I did not know that feature was in Excel.

Thanks for your help.


Ed Davis
"Don Guillett" wrote in message
...
The macro recorder is your friend. I just recorded this
Sub Macro15()
'
' Macro15 Macro
' Macro recorded 9/27/2009 by Donald B. Guillett
'

'
Sheets("Sheet19").Select
Sheets("Sheet19").Move
Cells.Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("A1").Select
Application.CutCopyMode = False
ActiveWorkbook.SaveAs Filename:="C:\personal\mynewbookname.xls",
FileFormat _
:=xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:= _
False, CreateBackup:=False
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ed Davis" wrote in message
...
Currently when the user uses a macro I save a copy of the workbook with
the sheet name imbedded in the workbook name. This is to indicate to me
what sheet the user was editing when the macro was run. example below:
workbook name saved as Sales 09-2009 (sheet1).xls.

Is there a way just to save the sheet they were working on. It would have
to be copied as values for this save only so I think I would have to
first copy the sheet to a new sheet as values. And then After the saving
has completed I would want the new sheet deleted from the workbook.

I hope I made myself clear enough on this if not I will give better
detail.


--
Thank You in Advance
Ed Davis




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
Saving in 1 worksheet only Mr. Burton Excel Worksheet Functions 11 October 21st 08 12:19 PM
Saving a worksheet JONESAROB Excel Discussion (Misc queries) 2 August 3rd 06 07:59 PM
Saving Worksheet Bobby28 Excel Discussion (Misc queries) 2 April 20th 05 09:55 PM
worksheet saving DYeomans Excel Discussion (Misc queries) 1 April 20th 05 08:04 AM
Saving a Worksheet GoBucks Excel Discussion (Misc queries) 3 January 27th 05 07:37 PM


All times are GMT +1. The time now is 08:30 PM.

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"