简体   繁体   English

从Excel打开时将访问窗口置于顶部

[英]Bring Access Window On Top When Opened From Excel

I have an Excel 2010 spreadsheet that brings in data from an Access 2010 database. 我有一个Excel 2010电子表格,可以从Access 2010数据库中导入数据。 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. Access打开后,任务栏中的图标会闪烁,但会停留在屏幕上其他任何图标的后面。 What I want is for Access to become the active window so that there's no chance of the user missing it. 我想要的是使Access成为活动窗口,以便用户没有机会丢失它。

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. 我以前使用过AppActivate ,但不一定了解其优缺点。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Excel VBA 2013-在打开工作簿后重新获得顶部打开的用户窗体的简便方法 - Excel VBA 2013 - Easy way to bring back on top opened userform after workbook opened 将之前打开的window(Word文档)调到前台 - Bring previous opened window (Word document) to foreground 从 Access 将变量分配给打开的 Excel 工作簿 - Assign a variable to an opened Excel workbook from Access 自动筛选从访问中打开的受保护的Excel工作表 - Autofilter a protected excel sheet opened from access 强行将excel窗口带到前面? - force to bring excel window to the front? 从 MS Access 打开时 VBA Excel 实例未关闭 - 后期绑定仍然相同的错误 - VBA Excel instance doesn't close when opened from MS Access - late binding still same error VBA Excel 实例在从 MS Access 打开时不会关闭 - 后期绑定 - VBA Excel instance doesn't close when opened from MS Access - late binding 当MainWindowHandle为0时将窗口置于前台 - Bring Window To Foreground When MainWindowHandle Is 0 通过Windows资源管理器打开时,将填充Excel 2007 ODBC数据,但通过Access VBA打开时,则不会填充 - Excel 2007 ODBC data populates when opened via Windows Explorer, but not when opened via Access VBA 关闭用户从Access-VBA打开的特定Excel文件 - Close specific Excel file opened by user from Access-VBA
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM