ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Save As (https://www.excelbanter.com/excel-programming/334063-save.html)

carloshernandezy

Save As
 
Hello to all,

I´m triying to save a file in variable directory and with a variable
name.

C:\.....\year\weekXX

Archive Name- ResumeWeekXX.xls

-year- is the value of a cell in worksheet DW1
-weekXX- is the value of a cell in worksheet DW1

Thanks for your help


kassie

Save As
 
Hi

I would declare some variables, set each variable to thbe value of one of
the referenced cell adresses, and then concatanate it,

Dim varDir, varYear, varWeek as String

varDir = "C:\ and your directory.....\"
varYear = cell address
varWeek = Cell address

Worksheet.SaveAs filename:= varDir & varYear & "\" & varWeek
"carloshernandezy" wrote:

Hello to all,

I´m triying to save a file in variable directory and with a variable
name.

C:\.....\year\weekXX

Archive Name- ResumeWeekXX.xls

-year- is the value of a cell in worksheet DW1
-weekXX- is the value of a cell in worksheet DW1

Thanks for your help



Tom Ogilvy

Save As
 
ActiveWorkbook.SaveAs "C:\.....\" & Range("DW1").Value & "\" & _
"AchiveName-Resume" & Range("DW2").Value & ".xls"

fill in the .....
--
Regards,
Tom Ogilvy

"carloshernandezy" wrote in message
oups.com...
Hello to all,

I´m triying to save a file in variable directory and with a variable
name.

C:\.....\year\weekXX

Archive Name- ResumeWeekXX.xls

-year- is the value of a cell in worksheet DW1
-weekXX- is the value of a cell in worksheet DW1

Thanks for your help



carloshernandezy

Save As
 
Thanks to all



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

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