It appears your procedure does not include an error handler. Easier just to trap the error number.
Code:
Dim db as dao.Database
Dim DBFullName as String
On Error GoTo ErrHandler
DBFullName = wkmain.(Cells(30,3).Value
Set db = OpenDatabase(DBFullName)
do stuff
ExitHere:
Set db = Nothing
Exit Sub
ErrHandler:
If Err.Number = 3024 Then Resume ExitHere
Else
Msgbox .....
Last edited by Micron; 06-29-2017 at 12:27 PM.
Reason: added info
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.