Do you want to save the changes you made to 'ABC.xls'?

B

Bob Barnes

I'm running Automation from Access-to-Excel.

As the Procedure ends, within Access, I'm getting
the "Subject" Message above. I've run Automation
from Access-to-Excel many times...but now this
message on this one File.

Any way to turn that off?

TIA - Bob
 
G

Gary''s Student

Put the following macro in the workbook in ThisWorkbook code:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
End Sub
 
B

Bob Barnes

Gary - thank you.

I'm almost completely an Access Programmer. Where do I find the module to
enter this code?

TIA - Bob
 
G

Gary''s Student

When Excel has focus, touch ALT-F11 to bring up VBA.

Go to the left-hand pane and right-click the ThisWorkbook icon in the small
object tree. Select View Code.
Paste the stuff in and close the VBA window.


MANUALLY SAVE THE WORKBOOK. You may not get a change again, cause you won't
be prompted.
 
B

Bob Barnes

That did it.

THANK you - Bob

Gary''s Student said:
When Excel has focus, touch ALT-F11 to bring up VBA.

Go to the left-hand pane and right-click the ThisWorkbook icon in the small
object tree. Select View Code.
Paste the stuff in and close the VBA window.


MANUALLY SAVE THE WORKBOOK. You may not get a change again, cause you won't
be prompted.
 
Top