Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA: saving as with the name of the worksheet

I have an application where I receive an Excel workbook
from an ERP system. Each workbook has a unique name. I
want to save the workbooks to an established file
location. When I record a macro with using the Save As I
want the file to be saved with the unique name passed to
me. In the recorded macro the specific workbook name is
called out. example:
ActiveWorkbook.SaveAs Filename:= "C:\Documents and
Settings\My Documents\uniquename.xls" How do I make the
marco take the exact workbook name in insert it over the
uniquename.xls ... ie making it a variable? Does that
make since to anyone?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default saving as with the name of the worksheet

ActiveWorkbook.SaveAs Filename:= "C:\Documents and
Settings\My Documents\" & Activeworkbook.Name

--
Regards,
Tom Ogilvy


"steve a" wrote in message
...
I have an application where I receive an Excel workbook
from an ERP system. Each workbook has a unique name. I
want to save the workbooks to an established file
location. When I record a macro with using the Save As I
want the file to be saved with the unique name passed to
me. In the recorded macro the specific workbook name is
called out. example:
ActiveWorkbook.SaveAs Filename:= "C:\Documents and
Settings\My Documents\uniquename.xls" How do I make the
marco take the exact workbook name in insert it over the
uniquename.xls ... ie making it a variable? Does that
make since to anyone?



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default saving as with the name of the worksheet

thank you Tom!
-----Original Message-----
ActiveWorkbook.SaveAs Filename:= "C:\Documents and
Settings\My Documents\" & Activeworkbook.Name

--
Regards,
Tom Ogilvy


"steve a" wrote in message
...
I have an application where I receive an Excel workbook
from an ERP system. Each workbook has a unique name. I
want to save the workbooks to an established file
location. When I record a macro with using the Save As

I
want the file to be saved with the unique name passed to
me. In the recorded macro the specific workbook name is
called out. example:
ActiveWorkbook.SaveAs Filename:= "C:\Documents and
Settings\My Documents\uniquename.xls" How do I make the
marco take the exact workbook name in insert it over the
uniquename.xls ... ie making it a variable? Does that
make since to anyone?



.

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 a worksheet Ed Davis[_2_] Excel Discussion (Misc queries) 2 September 28th 09 12:40 AM
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


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