ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Assign Cell Content As File Name (https://www.excelbanter.com/excel-programming/343121-assign-cell-content-file-name.html)

[email protected]

Assign Cell Content As File Name
 
I am attempting to create a macro that will save a workbook with the
file name under which I save the workbook coming from the contents of
one of the cells in the workbook. Suppose that each time the workbook
was altered, a specific cell (A1 on Sheet1 for instance) contained the
desired file name for that workbook. It is my goal to create a macro
that automatically assigns said workbook a name based on the content of
that cell. Any help would be most appreciated.


Chip Pearson

Assign Cell Content As File Name
 
Try something like

ThisWorkbook.SaveAs
filename:=Worksheets("Sheet1").Range("A1").Text


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




wrote in message
ups.com...
I am attempting to create a macro that will save a workbook with
the
file name under which I save the workbook coming from the
contents of
one of the cells in the workbook. Suppose that each time the
workbook
was altered, a specific cell (A1 on Sheet1 for instance)
contained the
desired file name for that workbook. It is my goal to create a
macro
that automatically assigns said workbook a name based on the
content of
that cell. Any help would be most appreciated.




jweasl

Assign Cell Content As File Name
 
How do you use that formula? I tried to figure it out and I can't seem to get
it to work at all

"Chip Pearson" wrote:

Try something like

ThisWorkbook.SaveAs
filename:=Worksheets("Sheet1").Range("A1").Text


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com




wrote in message
ups.com...
I am attempting to create a macro that will save a workbook with
the
file name under which I save the workbook coming from the
contents of
one of the cells in the workbook. Suppose that each time the
workbook
was altered, a specific cell (A1 on Sheet1 for instance)
contained the
desired file name for that workbook. It is my goal to create a
macro
that automatically assigns said workbook a name based on the
content of
that cell. Any help would be most appreciated.






All times are GMT +1. The time now is 12:09 AM.

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