I am running an Excel VBA module which opens Access file and runs a VBA Access module.
The problem is as soon as the Access file opens, then Excel continues the next steps of the code which relate to copying the Access database.
I would like to halt the Excel code after the Access file is opened, detect if the Access file has been closed, and then let the Excel code continue.
Is this possible in Excel VBA?
All suggestions and poineters would be gratefully received
with thanks,
Jill
Code:
Dim objAccess_Tx_Master As Access.Application
Application.DisplayAlerts = False
Set objAccess_Tx_Master = CreateObject(TempFilePath) ' the local database copy
objAccess_Tx_Master.Visible = True
'*************************************
'DO ALL THE EDITING NOW ON THE DATABASE
'*************************************
'when editing completed, and DB file closed <<< HOW TO DO THIS TEST?
myStr = MsgBox("Did you modify the database?", vbYesNo)
If myStr = vbYes Then
MsgBox"This will copy the modified database back to another location"