Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Cell value as filename
I'm working on a project where I want to be able to take the text (for
example RICH RD SE) that is in cell C1 and by use of macro or code save the workbook as "C1".xls (in this example, RICH RD SE.xls), close the current workbook with the new name and then open a new copy of the original. I managed to get it to work ONCE, but when I ran the macro on subsequent workbooks, it would try to name them EACH "RICH RD SE.xls" .. I am assuming that I need to use some sort of variable statement, but being the extreme novice in VBA, I can't quite figure out the syntax. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Saving Cell value as filename
Kathy,
Try something like ThisWorkbook.SaveAs filename:=Range("C1") & ".xls" -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Kathy B" wrote in message om... I'm working on a project where I want to be able to take the text (for example RICH RD SE) that is in cell C1 and by use of macro or code save the workbook as "C1".xls (in this example, RICH RD SE.xls), close the current workbook with the new name and then open a new copy of the original. I managed to get it to work ONCE, but when I ran the macro on subsequent workbooks, it would try to name them EACH "RICH RD SE.xls" . I am assuming that I need to use some sort of variable statement, but being the extreme novice in VBA, I can't quite figure out the syntax. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error message - Errors were detected while saving FILENAME | Excel Discussion (Misc queries) | |||
Saving file using value in cell as the filename | Excel Worksheet Functions | |||
Cell("filename") doesn't update to new filename when do save as. | Excel Worksheet Functions | |||
Saving XLS workbook with set filename | Excel Discussion (Misc queries) | |||
substitute the filename in a cell reference with a string in another cell. | Excel Discussion (Misc queries) |