Hidden macro from batch script (1 Viewer)

Kempes

Registered User.
Local time
Today, 05:02
Joined
Oct 7, 2004
Messages
327
Hi all,

I currently have a batch script that opens an access 97 db, runs a macro, then closes.

The user currently sees the app open up and close.

Is there a way to hide the access application when running the batch script?

Many thanks
Kempes
 

boblarson

Smeghead
Local time
Yesterday, 21:02
Joined
Jan 12, 2001
Messages
32,059
Nope, but you might be able to use APP.MINIMIZE before running your other macro upon opening so that it doesn't stay up on screen.
 

Kempes

Registered User.
Local time
Today, 05:02
Joined
Oct 7, 2004
Messages
327
Thanks for the reply.

found this elsewhere which seems to work. It means I no longer need a batch script. Running directly from excel (forget to mention I was also tying excel into this).

DatabaseName$ = "dbpath"
Set acapp = CreateObject("Access.Application")
acapp.Visible = False
acapp.OpenCurrentDatabase (DatabaseName$)
acapp.DoCmd.RunMacro "macroname"
acapp.closecurrentdatabase

However, I have just thought of another issue. Potentially, Users may not have acc 97 installed. May have to rethink this one.
 

Users who are viewing this thread

Top Bottom