Window pos issue when launch Access from Excel VBA

sagain2k

Board Regular
Joined
Sep 8, 2002
Messages
94
Posting this in both the Excel & Access forums just in case:

I can launch Access from an Excel macro fine like this:
-----------------------------
Sub ActivateAccess()
Dim appAccess As Object
FnameTest = "Testfile.mdb"
DocPath = "D:\Data\Dbase"
FnameTemp = DocPath & FnameTest
Set appAccess = GetObject(FnameTemp)
appAccess.Visible = True
End Sub
---------------------------------

My problem is that when activating Access this way the "switchboard" form window (and other subsequent switchboard form windows) wind up getting placed at the top left of the screen (and another one gets shoved off to the right edge when it's opened).

When I simply open Access normally via Windows Explorer or the Program menu, the switchboard form windows all appear nicely centered and placed as they should be.

Is there some parameter/argument I need to add to control the way these form windows are being positioned? Thanks for any help!
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,215,054
Messages
6,122,897
Members
449,097
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top