Another Save Question

  • Thread starter Thread starter Sandy
  • Start date Start date
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
 
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
 
Back
Top