codes, codes, codes...

J

jatman

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
 
D

Don Guillett

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

JMB

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top