closing file

N

Novice Lee

Hello,

I have a module that sorts data for me. part of the code opens a source file
then saves it to another directory with todays date and adds a number to it
it there is another file with that same name.
my question is how can i close the save as file,

Thanks
 
F

FSt1

hi
the saved file should be the active file so add a line of code to the macro.
ActiveWorkbook.Close

this assumes no changes were made to the saved file. if changes were made,
then it needs to be saved again.
ActiveWorkbook.Close True

regards
FSt1

regards
FSt1
 
N

Novice Lee

Thanks that was it

FSt1 said:
hi
the saved file should be the active file so add a line of code to the macro.
ActiveWorkbook.Close

this assumes no changes were made to the saved file. if changes were made,
then it needs to be saved again.
ActiveWorkbook.Close True

regards
FSt1

regards
FSt1
 

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