Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Save a File with a cell value

I have set my Excel file to save to a aprticular location, however I want to
be able to have the filename made up from the value in a worksheet cell i.e.

Currently I have

ChDir "C:\REPORTS"
ActiveWorkbook.SaveAs Filename:="C:\REPORTS\mailinglist.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

I want where the file name is mailinglist.xsl to be populated by a value
from a cell i.e. colleges21092005.xls (cellvalue+currentdate+filetype)

Any pointers would be greatly appreciated!


Tia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Save a File with a cell value

Put

"C:\REPORTS\" & Range("A1").Value & Replace(Date, ".", "") & ".xls"

in place of the filename! Substitute "A1" with the cell reference you want
to get the name from!

Regards,
Stefi



€˛Jonathan€¯ ezt Ć*rta:

I have set my Excel file to save to a aprticular location, however I want to
be able to have the filename made up from the value in a worksheet cell i.e.

Currently I have

ChDir "C:\REPORTS"
ActiveWorkbook.SaveAs Filename:="C:\REPORTS\mailinglist.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

I want where the file name is mailinglist.xsl to be populated by a value
from a cell i.e. colleges21092005.xls (cellvalue+currentdate+filetype)

Any pointers would be greatly appreciated!


Tia

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Save a File with a cell value

simpler to use Format for date, no international issues then, and better to
format as yyyymmdd for sorting purposes

Format(Date, "yyyymmdd")

--
HTH

Bob Phillips

"Stefi" wrote in message
...
Put

"C:\REPORTS\" & Range("A1").Value & Replace(Date, ".", "") & ".xls"

in place of the filename! Substitute "A1" with the cell reference you want
to get the name from!

Regards,
Stefi



"Jonathan" ezt ķrta:

I have set my Excel file to save to a aprticular location, however I

want to
be able to have the filename made up from the value in a worksheet cell

i.e.

Currently I have

ChDir "C:\REPORTS"
ActiveWorkbook.SaveAs Filename:="C:\REPORTS\mailinglist.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

I want where the file name is mailinglist.xsl to be populated by a value
from a cell i.e. colleges21092005.xls (cellvalue+currentdate+filetype)

Any pointers would be greatly appreciated!


Tia



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Save a File with a cell value

Yeees, I forgot that I have a specific default date format with "."s!
Stefi


€˛Bob Phillips€¯ ezt Ć*rta:

simpler to use Format for date, no international issues then, and better to
format as yyyymmdd for sorting purposes

Format(Date, "yyyymmdd")

--
HTH

Bob Phillips

"Stefi" wrote in message
...
Put

"C:\REPORTS\" & Range("A1").Value & Replace(Date, ".", "") & ".xls"

in place of the filename! Substitute "A1" with the cell reference you want
to get the name from!

Regards,
Stefi



"Jonathan" ezt Ć*rta:

I have set my Excel file to save to a aprticular location, however I

want to
be able to have the filename made up from the value in a worksheet cell

i.e.

Currently I have

ChDir "C:\REPORTS"
ActiveWorkbook.SaveAs Filename:="C:\REPORTS\mailinglist.xls",
FileFormat:= _
xlNormal, Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False _
, CreateBackup:=False

I want where the file name is mailinglist.xsl to be populated by a value
from a cell i.e. colleges21092005.xls (cellvalue+currentdate+filetype)

Any pointers would be greatly appreciated!


Tia




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
File save as cell value Tony. D Excel Discussion (Misc queries) 6 December 17th 08 12:02 AM
Autoname a save as file from a cell in a read only file g4rod Excel Discussion (Misc queries) 2 October 6th 06 01:16 PM
Save file with cell name Brian Thompson via OfficeKB.com New Users to Excel 7 January 18th 06 09:11 PM
Save a new file with the name that is in cell "C7" lunker55 Excel Discussion (Misc queries) 2 May 13th 05 04:57 PM
Save File to Another Directory, but not change Users File Save location Mike Knight Excel Programming 1 May 28th 04 09:06 PM


All times are GMT +1. The time now is 04:02 PM.

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

About Us

"It's about Microsoft Excel"