从Excel调用宏中的第一个动作项后,访问停止 [英] Access stops after first Action Item in Macro when called from Excel

查看:86
本文介绍了从Excel调用宏中的第一个动作项后,访问停止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行Windows 7,Access 2010和Excel 2013.

I am running Windows 7, Access 2010, and Excel 2013.

我的Excel文档中有一些打开Access数据库的VBA,设置了"StartDate"。和"EndDate"表单字段值,然后运行存储在Access中的宏。我注意到Access只是在Excel
尝试移动到下一行代码并关闭Access数据库之前在宏中运行第一个Action Item;给我一个关于仍然执行OLE过程的Access的错误。

I have some VBA in my Excel document that opens an Access database, sets a "StartDate" and "EndDate" form field value and then runs a macro stored in Access. I noticed Access is only running the first Action Item in the macro before Excel tries to move to the next line of code and close the Access database; giving me an error about Access still performing an OLE process.

1)为什么Access在"告诉"Excel继续之前没有运行宏中的所有操作项?

1) Why is Access not running all of the action items in the macro before 'telling' Excel to continue?

2)如何让Excel等待Access完成?

2) How do I make Excel wait for Access to complete?

我尝试了一个循环来检查锁定的访问文件并从Excel中逐行运行代码......这一切似乎都冻结了数据库。该宏可以从Access运行而没有任何问题。

EXCEL代码:

EXCEL CODE:

访问代码:

ACCESS CODE:

错误消息:

ERROR MESSAGE:

Michael Oskierko VBNOOB

Michael Oskierko VBNOOB

推荐答案

嗨迈克尔,

看看这个讨论:

http://answers.microsoft.com/en-us/ msoffice / forum / msoffice_access-mso_winother / access-2010-hangs-when-i-try-to-import-excel-data / 5478462d-e535-4c84-86b7-4eec60148865

亲切的问候。


这篇关于从Excel调用宏中的第一个动作项后,访问停止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆