Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Saving a file(new) using the multiple cell contents as a file name

I think ijb meant:

ActiveWorkbook.SaveAs Filename:="C:\" & Sheet1.Cells(1, 1) _
& "_" & Sheet1.Cells(1, 2)

(if the codename for the worksheet is named sheet1.)

or

ActiveWorkbook.SaveAs Filename:="C:\" & worksheets("sheet1").Cells(1, 1) _
& "_" & worksheets("sheet1").Cells(1, 2)

if the name were sheet1 (yeah, they could match up!).

ijb wrote:

ActiveWorkbook.SaveAs Filename:="C:\" & Sheet1!Cells(1, 1) & "_" &
Sheet1!Cells(1, 2)

Should do the trick

If I've mis-understood the question please tell me.

--
HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help

"Paul" wrote in message
...
I want to save a file(under a new name)using the cell
content of multiple cells as a new file name. For example,
I stored the department number, 21-01, in a cell and the
period number, 1, in another cell. I want to create the
macro to save this worksheet after updating all datas
under file name "21-01_1.xls" Can I do this? Please help!

Thanks,
Paul



--

Dave Peterson

  #2   Report Post  
Posted to microsoft.public.excel.programming
ijb ijb is offline
external usenet poster
 
Posts: 26
Default Saving a file(new) using the multiple cell contents as a file name

Yep, you're right, sorry for the typos :-)

--
If I've mis-understood the question please tell me.

HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help


"Dave Peterson" wrote in message
...
I think ijb meant:

ActiveWorkbook.SaveAs Filename:="C:\" & Sheet1.Cells(1, 1) _
& "_" & Sheet1.Cells(1, 2)

(if the codename for the worksheet is named sheet1.)

or

ActiveWorkbook.SaveAs Filename:="C:\" & worksheets("sheet1").Cells(1, 1) _
& "_" & worksheets("sheet1").Cells(1, 2)

if the name were sheet1 (yeah, they could match up!).

ijb wrote:

ActiveWorkbook.SaveAs Filename:="C:\" & Sheet1!Cells(1, 1) & "_" &
Sheet1!Cells(1, 2)

Should do the trick

If I've mis-understood the question please tell me.

--
HTH

ijb

Remove nospam from my e-mail address to talk direct

Not MCSD, MVP, TLA, P&P, PCMCIA, etc just trying to help

"Paul" wrote in message
...
I want to save a file(under a new name)using the cell
content of multiple cells as a new file name. For example,
I stored the department number, 21-01, in a cell and the
period number, 1, in another cell. I want to create the
macro to save this worksheet after updating all datas
under file name "21-01_1.xls" Can I do this? Please help!

Thanks,
Paul



--

Dave Peterson



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
2007 Macro to Open File, Delete Contents, Save New File Flintstone[_2_] Excel Discussion (Misc queries) 2 February 1st 10 11:25 PM
Saving Excel 2007 file in 2003 creates very large file Jon Pearce Excel Discussion (Misc queries) 2 July 16th 09 07:20 PM
Saving to a file multiple times NickB Excel Discussion (Misc queries) 2 January 24th 07 03:57 AM
Saving worksheet in new file with date AND cell value as file name michaelberrier Excel Discussion (Misc queries) 4 May 26th 06 08:05 PM
How do I stop Excel 2000 from saving file history from file that . Cathy Excel Discussion (Misc queries) 0 March 29th 05 03:27 PM


All times are GMT +1. The time now is 11:12 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"