Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try
Dim flToSave As String Dim flName As String Dim flFormat As Long flFormat = ActiveWorkbook.FileFormat flName = Sheets("Sheetname").Range("A1").Text & ".xls" 'If it is same as the current workbook flToSave = ActiveWorkbook.Path OR 'If it is a different path assign to that variable flToSave = "m:\contract\" ActiveWorkbook.SaveAs flToSave & "\" & flName, flFormat OR ActiveWorkbook.SaveCopyAs flToSave & "\" & flName If this post helps click Yes --------------- Jacob Skaria "Wes_A" wrote: I need to save the currently active sheet as a new workbook in a different directory (folder). The filename is volatile and is contained in a cell on the currently open sheet. e.g. September, October .... The saved file needs to be an Excel workbook format *.xls or *.xlsb I am trying to write a MACRO to automate this file save and then retuirn to the currently open sheet. Can anyone help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Function to insert current filename into worksheet? | Excel Worksheet Functions | |||
Save Current Workbook With Extended Filename | Excel Programming | |||
get the current filename as a variable | Excel Programming | |||
Doing a save with a variable filename? | Excel Programming | |||
USE MACRO TO SAVE WORKSHEET SELECTING FILENAME FROM CELLS | Excel Programming |