Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default codes, codes, codes...

i have the following code:

Public Sub SaveAsA1()
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

i understand the above code, but what i need it to do is in this order is:

save (like above into a target folder such as C:\Documents and Settings\All
Users\Documents\Folder Name\Filename ...

after the save, it prints out a copy of the file.

thank you,

jatman



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default codes, codes, codes...

Public Sub SaveAsA1()
mypath = "c:\a\"
ThisFile = Sheets("sheet1").Range("A1").Value
'MsgBox mypath & thisfile & ".xls"
ActiveWorkbook.SaveAs Filename:=mypath & ThisFile
End Sub


--
Don Guillett
SalesAid Software

"jatman" wrote in message
...
i have the following code:

Public Sub SaveAsA1()
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

i understand the above code, but what i need it to do is in this order is:

save (like above into a target folder such as C:\Documents and
Settings\All
Users\Documents\Folder Name\Filename ...

after the save, it prints out a copy of the file.

thank you,

jatman





  #3   Report Post  
Posted to microsoft.public.excel.misc
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default codes, codes, codes...

To print the entire workbook, try adding this to Don's suggestion.
ActiveWorkbook.PrintOut Copies:=1


"jatman" wrote:

i have the following code:

Public Sub SaveAsA1()
ThisFile = Range("A1").Value
ActiveWorkbook.SaveAs Filename:=ThisFile
End Sub

i understand the above code, but what i need it to do is in this order is:

save (like above into a target folder such as C:\Documents and Settings\All
Users\Documents\Folder Name\Filename ...

after the save, it prints out a copy of the file.

thank you,

jatman



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
printing zip codes Farmom Excel Discussion (Misc queries) 4 August 10th 06 03:14 AM
I have two columns (A) and (G) that have like product codes however [email protected] Excel Worksheet Functions 1 August 4th 06 08:19 PM
Zip codes and Distances brutonparish Excel Discussion (Misc queries) 0 July 3rd 06 05:42 AM
Excel 2003 list of field codes for footers? SS.Minnowski Excel Discussion (Misc queries) 4 April 21st 06 05:13 PM
Vlookup w/multiple codes Whnke Excel Worksheet Functions 2 March 12th 06 08:09 PM


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