![]() |
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 |
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 |
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 |
All times are GMT +1. The time now is 06:52 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com