ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   saving a worksheet using a macro (https://www.excelbanter.com/excel-programming/378134-saving-worksheet-using-macro.html)

Sparky AKA_Sparkticus

saving a worksheet using a macro
 
I want to save worksheets using data from a cell

12108(12-06-06) i would like to auto save using macro to select the data
in cell b1 mark(12-06-06) is this possible?

I tried but it used the same data as when i set up the macro each time not
the data that was in the cell at the time.

Sparkyman






Ron de Bruin

saving a worksheet using a macro
 
Hi

I want to save worksheets using data from a cell


You can change this example
http://www.rondebruin.nl/copy6.htm

replace the save line with this one

Wb.SaveAs FolderName _
& "\" & Wb.Sheets(1).Range("B1").Value & ".xls"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Sparky AKA_Sparkticus" wrote in message k...
I want to save worksheets using data from a cell

12108(12-06-06) i would like to auto save using macro to select the data
in cell b1 mark(12-06-06) is this possible?

I tried but it used the same data as when i set up the macro each time not
the data that was in the cell at the time.

Sparkyman






Sparky AKA_Sparkticus

saving a worksheet using a macro
 
Hi Thanks for the link and the code

got it down to:

Dim Wb As Workbook
Set Wb = ActiveWorkbook
Wb.SaveAs Wb.Sheets(1).Range("B1").Value & ".xls"
MsgBox "File coppied into ??????"

which works great for me but was wondering if there was a way to designate
the folder it saves to?

sparkyman


Ron de Bruin wrote:
Hi

I want to save worksheets using data from a cell


You can change this example
http://www.rondebruin.nl/copy6.htm

replace the save line with this one

Wb.Saves Folder _
& "\" & Wb.Sheets(1).Range("B1").Value & ".xls"



"Sparky AKA_Sparkticus" wrote in
message k...
I want to save worksheets using data from a cell

12108(12-06-06) i would like to auto save using macro to select
the data in cell b1 mark(12-06-06) is this possible?

I tried but it used the same data as when i set up the macro each
time not the data that was in the cell at the time.

Sparkyman


--

There's no underestimating the intelligence of the American public.
H. L. Mencken (1880 - 1956)




Ron de Bruin

saving a worksheet using a macro
 
For C:\Data use

Wb.SaveAs "C:\Data\" & Wb.Sheets(1).Range("B1").Value & ".xls"


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Sparky AKA_Sparkticus" wrote in message k...
Hi Thanks for the link and the code

got it down to:

Dim Wb As Workbook
Set Wb = ActiveWorkbook
Wb.SaveAs Wb.Sheets(1).Range("B1").Value & ".xls"
MsgBox "File coppied into ??????"

which works great for me but was wondering if there was a way to designate
the folder it saves to?

sparkyman


Ron de Bruin wrote:
Hi

I want to save worksheets using data from a cell


You can change this example
http://www.rondebruin.nl/copy6.htm

replace the save line with this one

Wb.Saves Folder _
& "\" & Wb.Sheets(1).Range("B1").Value & ".xls"



"Sparky AKA_Sparkticus" wrote in
message k...
I want to save worksheets using data from a cell

12108(12-06-06) i would like to auto save using macro to select
the data in cell b1 mark(12-06-06) is this possible?

I tried but it used the same data as when i set up the macro each
time not the data that was in the cell at the time.

Sparkyman


--

There's no underestimating the intelligence of the American public.
H. L. Mencken (1880 - 1956)




Sparky AKA_Sparkticus

saving a worksheet using a macro
 
Thanks for the assist Ron.


SparkyMan

Ron de Bruin wrote:
For C:\Data use

Wb.SaveAs "C:\Data\" & Wb.Sheets(1).Range("B1").Value & ".xls"



"Sparky AKA_Sparkticus" wrote in
message k...
Hi Thanks for the link and the code

got it down to:

Dim Wb As Workbook
Set Wb = ActiveWorkbook
Wb.SaveAs Wb.Sheets(1).Range("B1").Value & ".xls"
MsgBox "File coppied into ??????"

which works great for me but was wondering if there was a way to
designate the folder it saves to?

sparkyman


Ron de Bruin wrote:
Hi

I want to save worksheets using data from a cell

You can change this example
http://www.rondebruin.nl/copy6.htm

replace the save line with this one

Wb.Saves Folder _
& "\" & Wb.Sheets(1).Range("B1").Value &
".xls"



"Sparky AKA_Sparkticus" wrote in
message k...
I want to save worksheets using data from a cell

12108(12-06-06) i would like to auto save using macro to select
the data in cell b1 mark(12-06-06) is this possible?

I tried but it used the same data as when i set up the macro each
time not the data that was in the cell at the time.

Sparkyman


--

There's no underestimating the intelligence of the American public.
H. L. Mencken (1880 - 1956)


--

There's no underestimating the intelligence of the American public.
H. L. Mencken (1880 - 1956)





All times are GMT +1. The time now is 01:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com