View Full Version : Minimize Excel Window via code


Dale Fye
02-28-2006, 11:57 AM
I am running some automation from Access. I have opened an Excel workbook,
but when I do so, becomes the primary object on screen, rather than my Access
application. I would like to minimize the Excel window once it is open and
visible.

Unfortunately, I'm still not familiar enough with the Excel object model to
figure this out.

Thanks for your assistance.

Dr. Stephan Kassanke
02-28-2006, 06:30 PM
"Dale Fye" <dale.fye@nospam.com> schrieb im Newsbeitrag
news:C000B606-9121-49CE-8770-EE3A24049A3D@microsoft.com...
>I am running some automation from Access. I have opened an Excel workbook,
> but when I do so, becomes the primary object on screen, rather than my
> Access
> application. I would like to minimize the Excel window once it is open
> and
> visible.
>
> Unfortunately, I'm still not familiar enough with the Excel object model
> to
> figure this out.
>
> Thanks for your assistance.
>
>

Hi Dale,

the Excel application object has the windowstate property. I assume you have
an object variable in your Access program, e.g. xlApp which points to your
Excel instance.

xlApp.WindowState=xlMinimized

will minimize the Excel window.

Stephan