Open Application with window maximised

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

I want to open an application from within Access 2002
with that application's window maximised - any
suggestions as to the code?
 
with the "With" statement try:

..Application.Maximise

I only guessing here. It works with "Quit".
 
Hi Tom

I assume you don't mean you want to maximise the window of your Access
application, but of the app you are launching.

It depends on how you are launching the other app, but one way is to use the
Shell function:

Dim TaskID as Long
TaskID = Shell( "excel", vbMaximizedFocus
AppActivate TaskID
 
Thanks Graham

Your assumption was correct and the code does exactly
what I want. Out of interest could

Call Shell("Notepad.EXE", vbMaximizedFocus)

not be used instead?

Tom
-----Original Message-----
Hi Tom

I assume you don't mean you want to maximise the window of your Access
application, but of the app you are launching.

It depends on how you are launching the other app, but one way is to use the
Shell function:

Dim TaskID as Long
TaskID = Shell( "excel", vbMaximizedFocus
AppActivate TaskID

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


I want to open an application from within Access 2002
with that application's window maximised - any
suggestions as to the code?


.
 
One problem here is the consistency... if you have a main
form open with DoCmd.Maximize and then when you select a
button on this form hide the main form visible=false, it
doesn't necessarily open back up maximized. You can set
it under the On Load and On Open properties but it is not
consistent.
 
Call Shell("Notepad.EXE", vbMaximizedFocus)

Sure! The AppActivate is usually not required - I just added it for
completeness.
--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand

Tom said:
Thanks Graham

Your assumption was correct and the code does exactly
what I want. Out of interest could

Call Shell("Notepad.EXE", vbMaximizedFocus)

not be used instead?

Tom
-----Original Message-----
Hi Tom

I assume you don't mean you want to maximise the window of your Access
application, but of the app you are launching.

It depends on how you are launching the other app, but one way is to use the
Shell function:

Dim TaskID as Long
TaskID = Shell( "excel", vbMaximizedFocus
AppActivate TaskID

--
Good Luck!

Graham Mandeno [Access MVP]
Auckland, New Zealand


I want to open an application from within Access 2002
with that application's window maximised - any
suggestions as to the code?


.
 
Back
Top