Object is not in active view

bharlow

Registered User.
Local time
Today, 18:47
Joined
Dec 26, 2008
Messages
52
I created a macro to close Access by simply using the Quit action with the Exit argument.

When I run the macro I get an error message like this...

You may be in a read-only db or an earlier version of Office

The type of object the action applies to isn't currently selected or isn't in the active view.

The DB is not read only and I have office 2007 so I assume the second part of the error message is the problem.

Does anyone know how I can put the Quit action in the active view?

Thanks
 
Not sure what this quit with Exit argument is that you are talking about, but you should be able to just use the VBA code:

Application.Quiit
 
I am using a macro to exit the application in conjunction with a task scheduler. In the Macro's action box I am choosing Quit and in the argument box I am choosing Exit.

I'm not sure how to accomplish this with VBA code. A bit of a neophyte.

PLease advise
 
First of all what is your entire macro? You say "in conjunction with a task scheduler" - so what does that mean?
 
Bob,

I tried application.quit but it pretty much causes the same error.

The error message I am getting is

The command or action ‘Quit’ isn’t available now

How do I make the action available?

Thanks for your help
 
1. is the quit function in the same macro as your other tasks?

2. If so, you should create a function to quit and then call it after the macro actions are done.
 

Users who are viewing this thread

Back
Top Bottom