#1   Report Post  
Posted to microsoft.public.excel.programming
tc tc is offline
external usenet poster
 
Posts: 40
Default Save As

hi. i have a worksheet which contains a name in a particular cell. is
it possible to create a macro that will use this name and save a copy
of the workbook with that name?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Save As

This doesn't specify a path unless that is in your cell with the
filename. But you can always add that into the code.
Sub foo()
ThisWorkbook.SaveAs Range("A1").Text
End Sub
tc wrote:
hi. i have a worksheet which contains a name in a particular cell. is
it possible to create a macro that will use this name and save a copy
of the workbook with that name?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 638
Default Save As

Also, if you are storing your code in a separate workbook, you will
need to use ActiveWorkbook instead of ThisWorkbook.
JW wrote:
This doesn't specify a path unless that is in your cell with the
filename. But you can always add that into the code.
Sub foo()
ThisWorkbook.SaveAs Range("A1").Text
End Sub
tc wrote:
hi. i have a worksheet which contains a name in a particular cell. is
it possible to create a macro that will use this name and save a copy
of the workbook with that name?


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
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
How to diasble save and save as menu but allow a save button hon123456 Excel Programming 1 June 12th 06 09:50 AM
how to get disk icon on save button of save as dialog like 2000 RichT Excel Discussion (Misc queries) 2 March 9th 06 08:13 PM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM


All times are GMT +1. The time now is 10:44 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"