ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   save a workbook using Two different cells for a reference (https://www.excelbanter.com/excel-programming/409558-save-workbook-using-two-different-cells-reference.html)

batmanz

save a workbook using Two different cells for a reference
 
I want to save a workbook referencing a cell (with a name in it) and a cell
with a date in it (=today() )
I know very little about macros and I understand that this can be done using
a macro. do you use a button on the sheet assigned to a macro? what is the
format for a macro?
Can this be done without a macro?
in the end, i would like to be able to search by the date or by the name in
the cell

Barb Reinhardt

save a workbook using Two different cells for a reference
 
You'll probably want to do this with a Workbook_BeforeSave event. I don't
have any code here to copy, so that's about the best I can do for now. That
should get you started.

If you have named ranges tied to those cells, you could do something like this

SuggestedName = Range("Rangename1) & "_" & Format(Range("Date"),"yyyyy-mm-dd")

Just make sure you have values in each of the cells.

--
HTH,
Barb Reinhardt



"batmanz" wrote:

I want to save a workbook referencing a cell (with a name in it) and a cell
with a date in it (=today() )
I know very little about macros and I understand that this can be done using
a macro. do you use a button on the sheet assigned to a macro? what is the
format for a macro?
Can this be done without a macro?
in the end, i would like to be able to search by the date or by the name in
the cell


batmanz

save a workbook using Two different cells for a reference
 
Barb,

Thanks for the input. I'll work on it to give it a whirl. I think I need
more information on how the whole process works. I am a real rookie deep in
advanced territory. Thanks

"Barb Reinhardt" wrote:

You'll probably want to do this with a Workbook_BeforeSave event. I don't
have any code here to copy, so that's about the best I can do for now. That
should get you started.

If you have named ranges tied to those cells, you could do something like this

SuggestedName = Range("Rangename1) & "_" & Format(Range("Date"),"yyyyy-mm-dd")

Just make sure you have values in each of the cells.

--
HTH,
Barb Reinhardt



"batmanz" wrote:

I want to save a workbook referencing a cell (with a name in it) and a cell
with a date in it (=today() )
I know very little about macros and I understand that this can be done using
a macro. do you use a button on the sheet assigned to a macro? what is the
format for a macro?
Can this be done without a macro?
in the end, i would like to be able to search by the date or by the name in
the cell


Barb Reinhardt

save a workbook using Two different cells for a reference
 
Here's some "light" reading on Worksheet and Workbook events.

http://www.mvps.org/dmcritchie/excel/event.htm
--
HTH,
Barb Reinhardt



"batmanz" wrote:

Barb,

Thanks for the input. I'll work on it to give it a whirl. I think I need
more information on how the whole process works. I am a real rookie deep in
advanced territory. Thanks

"Barb Reinhardt" wrote:

You'll probably want to do this with a Workbook_BeforeSave event. I don't
have any code here to copy, so that's about the best I can do for now. That
should get you started.

If you have named ranges tied to those cells, you could do something like this

SuggestedName = Range("Rangename1) & "_" & Format(Range("Date"),"yyyyy-mm-dd")

Just make sure you have values in each of the cells.

--
HTH,
Barb Reinhardt



"batmanz" wrote:

I want to save a workbook referencing a cell (with a name in it) and a cell
with a date in it (=today() )
I know very little about macros and I understand that this can be done using
a macro. do you use a button on the sheet assigned to a macro? what is the
format for a macro?
Can this be done without a macro?
in the end, i would like to be able to search by the date or by the name in
the cell


batmanz

save a workbook using Two different cells for a reference
 
Barb,

I will definitely go for the light reading,thanks.

I found the answer to my question by your references and some others.For
anyone else who is interested, here it is

ActiveWorkbook.SaveAs Filename:=Range("C3") & Format(Date,'mm-dd-yyy") & xls

I am sure that I will be back

"Barb Reinhardt" wrote:

Here's some "light" reading on Worksheet and Workbook events.

http://www.mvps.org/dmcritchie/excel/event.htm
--
HTH,
Barb Reinhardt



"batmanz" wrote:

Barb,

Thanks for the input. I'll work on it to give it a whirl. I think I need
more information on how the whole process works. I am a real rookie deep in
advanced territory. Thanks

"Barb Reinhardt" wrote:

You'll probably want to do this with a Workbook_BeforeSave event. I don't
have any code here to copy, so that's about the best I can do for now. That
should get you started.

If you have named ranges tied to those cells, you could do something like this

SuggestedName = Range("Rangename1) & "_" & Format(Range("Date"),"yyyyy-mm-dd")

Just make sure you have values in each of the cells.

--
HTH,
Barb Reinhardt



"batmanz" wrote:

I want to save a workbook referencing a cell (with a name in it) and a cell
with a date in it (=today() )
I know very little about macros and I understand that this can be done using
a macro. do you use a button on the sheet assigned to a macro? what is the
format for a macro?
Can this be done without a macro?
in the end, i would like to be able to search by the date or by the name in
the cell



All times are GMT +1. The time now is 08:40 AM.

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