Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Create filename based on cell contents

This is something I figured out once before, but for the
life of me I can't remember how to do it anymore....

I have a workbook set up to retrieve data from a Remedy
Ticket database. I have my refresh code and auto
generation of formulas down with no problem. What I need
to do is to be able to run a macro that will save the
file with the current data to a filename based on the
contents of a cell (for ex. B1 might equal "Open Tickets
12-2-04", the date is computed with a NOW function). I
can get this to work with a static file name, putting it
all in a Workbook Open macro, and having the workbook run
on a schedule, but I need the filename as displayed in
cell B1, so I we can retain some historical snapshots as
they occur.

Any ideas.....

Thanks,
Rudy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Create filename based on cell contents

Workbooks.Open Filename:=Range("B1").Value & ".xls"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rudy W" wrote in message
...
This is something I figured out once before, but for the
life of me I can't remember how to do it anymore....

I have a workbook set up to retrieve data from a Remedy
Ticket database. I have my refresh code and auto
generation of formulas down with no problem. What I need
to do is to be able to run a macro that will save the
file with the current data to a filename based on the
contents of a cell (for ex. B1 might equal "Open Tickets
12-2-04", the date is computed with a NOW function). I
can get this to work with a static file name, putting it
all in a Workbook Open macro, and having the workbook run
on a schedule, but I need the filename as displayed in
cell B1, so I we can retain some historical snapshots as
they occur.

Any ideas.....

Thanks,
Rudy



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Create filename based on cell contents

Thanks for the assist...

I was able to take some of your syntax and insert it as
follows to get the job done:

ActiveWorkbook.SaveAs Filename:=Range("B1").Value
& ".xls", FileFormat:=xlNormal, _
Password:="", WriteResPassword:="",
ReadOnlyRecommended:=False, _
CreateBackup:=False


-----Original Message-----
Workbooks.Open Filename:=Range("B1").Value & ".xls"

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Rudy W" wrote in

message
...
This is something I figured out once before, but for

the
life of me I can't remember how to do it anymore....

I have a workbook set up to retrieve data from a Remedy
Ticket database. I have my refresh code and auto
generation of formulas down with no problem. What I

need
to do is to be able to run a macro that will save the
file with the current data to a filename based on the
contents of a cell (for ex. B1 might equal "Open

Tickets
12-2-04", the date is computed with a NOW function). I
can get this to work with a static file name, putting

it
all in a Workbook Open macro, and having the workbook

run
on a schedule, but I need the filename as displayed in
cell B1, so I we can retain some historical snapshots

as
they occur.

Any ideas.....

Thanks,
Rudy



.

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
Way to create a note based on the contents entered in a cell? Nicci Excel Discussion (Misc queries) 4 April 7th 10 11:53 PM
Create filename based on cell contents JR Hester Excel Worksheet Functions 7 April 4th 07 11:34 PM
How to include the contents of a cell in a filename BARGAIN BIN Excel Programming 1 September 8th 04 08:24 PM
Set Saveas Filename from Cell Contents Using VBA Celtic_Avenger Excel Programming 1 September 5th 04 10:57 PM
cell contents as filename Jeff R Excel Programming 1 August 26th 04 03:02 PM


All times are GMT +1. The time now is 05:57 PM.

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"