简体   繁体   中英

Bring Access Window On Top When Opened From Excel

I have an Excel 2010 spreadsheet that brings in data from an Access 2010 database. The user has to login to be able to access the records. When Access opens, the icon in the taskbar flashes, but stays behind whatever else is on the screen. What I want is for Access to become the active window so that there's no chance of the user missing it.

What would be the best way to go about doing this?

I have used AppActivate before, but I don't necessarily know the pros and cons.

Sub ActivateAccess()
  On Error Resume Next
  AppActivate "Microsoft Access"
  On Error GoTo 0
End Sub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM