Minimize Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

As part of a function I use, a few excel files are opened. The problem is
that Excel becomes the active window and the user is not seeing a
prompt/message box in Access that is used to complete the function. They only
see the prompt when they return to Access. Is there a way to launch the excel
files and then minimize Excel to the Taskbar while leaving the files open?
The user could then comply with the prompt in Access and then work away in
Excel by clicking on it in the Taskbar
 
Geoff
Think I sorted the problem.

I'm a bit of a novice at VB so took me a while!

I changed the line to:

Dim objXL As Object

The code is working perfectly now. Thanks for the help.
 
Thanks for the reply Geoff

I've used your suggestions but when I go to compile my function, I'm getting
a
"User defined type not defined" in respect of the line declaring the Excel
Application as an object:

Dim objXL As Excel.Application

Any suggestions?

Thanks again for the help

Andrew
 
Well done that man!

My guess is you've not set a reference to Excel. If you want to set a
reference, do this:

1. In the VBA editor, open the Tools menu and select References.
2. In the References dialog, select Microsoft Excel.

The advantages of having a reference are (1) you can declare variables as
objects within the object library you've referenced (eg Dim objXL as
Excel.Application) and (2) "Intellisense" then works in the VBA editor
(which means when you type a full stop after an object variable, you get to
see the object's properties, methods, etc, in a pop-up list - which makes
programming easier).

The requirement for setting a reference to an object library is that the
program (eg Excel) must be installed on all the machines you plan to run
your Access application on. Otherwise, declaring object variables as
"Object" is the right approach.

If you need more info, read about late- and early-binding.

Regards
Geoff
 
Well done that man!

My guess is you've not set a reference to Excel. If you want to set a
reference, do this:

1. In the VBA editor, open the Tools menu and select References.
2. In the References dialog, select Microsoft Excel.

The advantages of having a reference are (1) you can declare variables as
objects within the object library you've referenced (eg Dim objXL as
Excel.Application) and (2) "Intellisense" then works in the VBA editor
(which means when you type a full stop after an object variable, you get to
see the object's properties, methods, etc, in a pop-up list - which makes
programming easier).

The requirement for setting a reference to an object library is that the
program (eg Excel) must be installed on all the machines you plan to run
your Access application on. Otherwise, declaring object variables as
"Object" is the right approach.

If you need more info, read about late- and early-binding.

Regards
Geoff
 
Back
Top