Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default SaveAs using cell value

I have a workbook that has a cell which holds a 6 digit number. The first 2
digits of this number designate what folder it needs to be saved in. (eg
12456 should be saved in the "12 series" folder, 08569 should be saved in the
"08 series" folder) I want to create a macro that will save the file in the
correct folder (J:\My Documents\12 series\) with file name 12456 Pickup.xls.
I can't seem to get the syntax right. I don't want it to verify anything,
just save the workbook. Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default SaveAs using cell value


Activeworkbook.SaveAs Filename:= "J:\My Documents\" & _
Left(Range("A1").Value,2) & " Series\" & _
Range("A1").Value & " Pickup.xls"

--

HTH

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


"JCanyoneer" wrote in message
...
I have a workbook that has a cell which holds a 6 digit number. The first

2
digits of this number designate what folder it needs to be saved in. (eg
12456 should be saved in the "12 series" folder, 08569 should be saved in

the
"08 series" folder) I want to create a macro that will save the file in

the
correct folder (J:\My Documents\12 series\) with file name 12456

Pickup.xls.
I can't seem to get the syntax right. I don't want it to verify anything,
just save the workbook. Any ideas?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default SaveAs using cell value

You Rock Bob! Thank you!

"Bob Phillips" wrote:


Activeworkbook.SaveAs Filename:= "J:\My Documents\" & _
Left(Range("A1").Value,2) & " Series\" & _
Range("A1").Value & " Pickup.xls"

--

HTH

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


"JCanyoneer" wrote in message
...
I have a workbook that has a cell which holds a 6 digit number. The first

2
digits of this number designate what folder it needs to be saved in. (eg
12456 should be saved in the "12 series" folder, 08569 should be saved in

the
"08 series" folder) I want to create a macro that will save the file in

the
correct folder (J:\My Documents\12 series\) with file name 12456

Pickup.xls.
I can't seem to get the syntax right. I don't want it to verify anything,
just save the workbook. Any ideas?




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
howto: saveas with file name from a cell in the current worksheet bob New Users to Excel 2 April 17th 09 03:46 PM
howto: saveas with file name from a cell in the current worksheet bob New Users to Excel 0 April 5th 07 05:30 PM
Set Saveas Filename from Cell Contents Using VBA Celtic_Avenger Excel Programming 1 September 5th 04 10:57 PM
Macro to open SaveAs... and change filename to cell value Andy Excel Programming 5 July 19th 04 12:23 PM
Problems with active cell after saveas BrianG[_4_] Excel Programming 1 September 24th 03 11:27 AM


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