#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 295
Default 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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable Names in Source Data References in Charts Teflon TA Charts and Charting in Excel 2 January 21st 07 05:46 AM
Listing variable names for 3 greatest values in a column? Lindsay Excel Worksheet Functions 3 July 24th 06 09:30 PM
Variable Names in Formulas Paulo Excel Discussion (Misc queries) 2 March 29th 06 01:16 PM
Combining workbooks with some variable field names Bob Dobalina Excel Discussion (Misc queries) 8 May 17th 05 09:48 PM
are variable table-array names in functions possible? JimH Excel Discussion (Misc queries) 2 April 7th 05 09:51 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"