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

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,215,066
Messages
6,122,948
Members
449,095
Latest member
nmaske

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