Link to home
Start Free TrialLog in
Avatar of Allen Prince
Allen PrinceFlag for United States of America

asked on

close other workbook - close excel - do not save

We have a data work book that is used to copy data from Access.  

The data is linked to a second workbook
We use VBA code to save the second workbook and break the links to the data work book
We want to close the data workbook without saving, after the code has run

How do I close the Data workbook from within the  code on the second workbook?
I do not want any alerts.
It would also be ok to quit excel with no alerts as the second workbook was saved earlier
SOLUTION
Avatar of byundt
byundt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Allen Prince

ASKER

We are on the right track
except when I use Workbooks().Close SaveChanges:=False
it activates the workbook but does not close it and the code does not continue
I should mention that the workbook we are trying to close is an .XLS
I've requested that this question be closed as follows:

Accepted answer: 0 points for AMixMaster's comment #a39916376
Assisted answer: 300 points for byundt's comment #a39915417
Assisted answer: 0 points for AMixMaster's comment #a39916117

for the following reason:

Found the solution on a member website and it worked like a charm :)
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial