Macro that opens an xls file then saves it with another name

  • Thread starter Thread starter Captain Snuggles
  • Start date Start date
C

Captain Snuggles

I just want to be able to call an existing excel file, junk.xls, then
save it as notjunk.xls. Any ideas?
 
I think this will work.

Sub Vert()
myPath = ThisWorkbook.Path
Set wb = Workbooks.Open Filename:=myPath & "\junk.xls"
wb.SaveAs filename:="notjunk.xls"
End Sub
 

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

Back
Top