Another Save Question

S

Sandy

The following 1) Save a workbook 'as' and then closes it - followed by 2)
the original book 'Not Saved' and then closing.
Is it possible to have the workbook 'saved as' without it closing and still
have the original book close without saving


ThisWorkbook.SaveCopyAs Filename:="Personal Data-" & inputText & ".xls"

ThisWorkbook.Close SaveChanges:=False

Sandy
 
B

Barb Reinhardt

I'm confused as to what you are asking. When you execute the first line, it
saves "ThisWorkbook" with a new name. The workbook name that Excel knows is
the original workbook name.

Basically, you're saying that you want to have a file call "Personal ..."
opened after it's saved.

Try something like this

You'll need to enter the entire file path where it has filename.

Dim oWB as workbook
set oWB = workbooks.open(filename,UpdateLinks:=False)


Then you'll have a workbook called ThisWorkbook and another called oWB
 

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