update

C

ceemo

I am exporting some information from a workbook into my open work book.
the macro opens the other workbook inserts a date which is calculated
and returns the outcome into my original book.

The problem is that when i open the closed book it updates a now()
function and when i close it, it asks if i want to save the book, which
i dont?

can i get around this?
 
F

Franz Verga

ceemo said:
I am exporting some information from a workbook into my open work
book. the macro opens the other workbook inserts a date which is
calculated and returns the outcome into my original book.

The problem is that when i open the closed book it updates a now()
function and when i close it, it asks if i want to save the book,
which i dont?

can i get around this?

You can use something like this:

ThisWorkbook.Saved = True

or

ActiveWorkbook.Saved = True


Check for Saved on VBA on line help.


--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy
 
G

Guest

Add this in your macro:
Workbooks(name of workbook you want to close).Close False

Best
Petter


ceemo skrev:
 

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