ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   variable file names (https://www.excelbanter.com/excel-discussion-misc-queries/133031-variable-file-names.html)

Brettjg

variable file names
 
I have created a cell that has a varaible file name and I want to save the
file in a variable folder name (for which I have another cell with the new
info). The folder is \SURNAME, INITAL\ and the file name is FINANCE
SURNAME.xls. I open the master FINANCE file and I want to save it as
"C:\ACTIVE CLIENTS\SURNAME, INITIAL\FINANCE SURNAME.xls" The variables in
that path are "SURNAME" and "INITIAL".

How do I get VB to get the information from the cell and then save the new
variable name file? The cells are called folder_name and file_name

Bob Phillips

variable file names
 
With Worksheets("Sheet1")
Activeworkbook.SaveAs Filename:= .Range("folder_name") &
..Range("file_name")
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Brettjg" wrote in message
...
I have created a cell that has a varaible file name and I want to save the
file in a variable folder name (for which I have another cell with the new
info). The folder is \SURNAME, INITAL\ and the file name is FINANCE
SURNAME.xls. I open the master FINANCE file and I want to save it as
"C:\ACTIVE CLIENTS\SURNAME, INITIAL\FINANCE SURNAME.xls" The variables in
that path are "SURNAME" and "INITIAL".

How do I get VB to get the information from the cell and then save the new
variable name file? The cells are called folder_name and file_name




Brettjg

variable file names
 
Thankyou so much Bob, you've changed my life!

"Bob Phillips" wrote:

With Worksheets("Sheet1")
Activeworkbook.SaveAs Filename:= .Range("folder_name") &
..Range("file_name")
End With

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Brettjg" wrote in message
...
I have created a cell that has a varaible file name and I want to save the
file in a variable folder name (for which I have another cell with the new
info). The folder is \SURNAME, INITAL\ and the file name is FINANCE
SURNAME.xls. I open the master FINANCE file and I want to save it as
"C:\ACTIVE CLIENTS\SURNAME, INITIAL\FINANCE SURNAME.xls" The variables in
that path are "SURNAME" and "INITIAL".

How do I get VB to get the information from the cell and then save the new
variable name file? The cells are called folder_name and file_name






All times are GMT +1. The time now is 11:47 PM.

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