Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Saving a worksheet | Excel Discussion (Misc queries) | |||
Saving in 1 worksheet only | Excel Worksheet Functions | |||
Saving a worksheet | Excel Discussion (Misc queries) | |||
Saving Worksheet | Excel Discussion (Misc queries) | |||
worksheet saving | Excel Discussion (Misc queries) |