Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - VBA for Open As Copy ?

Status
Not open for further replies.

Meander365

Programmer
May 17, 2001
14
GB
Excel 2000.

Im trying to open up an Excel workbook but as a copy. You can do this normally with the Options button on the File-->Open dialog box.

Can anyone provide me with the code for this ?

Thanks!
 
You have to first make a copy of the file, and then open it. Or, read the original file, and do an immediate Save As with "copy of " front-appended to the name:

Workbooks.Open MyFileName
ThisWorkbook.SaveAs Thisworkbook.path & "Copy of " & thisworkbook.name

Rob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top