Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

支援 2011 年 7 月 12,Windows Vista Service Pack 1 (SP1) 結尾。若要繼續接收 Windows 安全性更新,請確定您正在執行 Windows Vista Service Pack 2 (SP2)。如需詳細資訊,請造訪下列 Microsoft 網頁︰

結束 Windows 的某些版本的支援

微軟知識庫文件 2640696 中描述解決類似的問題,在 Windows 7 SP1 和 Windows Server 2008 R2 SP1 中的 hotfix。如需有關 KB 2640696 的詳細資訊,請按一下下面的文件編號,檢視 「 Microsoft 知識庫 」 中的文︰

2640696在 Windows 7 SP1 中,或在 Windows Server 2008 R2 SP1 中編譯的 ADO 架構應用程式不會執行較早版本 Windows 中

狀況


假設您有在 32 位元版本的 Microsoft Office 應用程式可以正常執行的 (VBA) 巨集的 Microsoft Visual Basic for Applications。不過,此 VBA 巨集無法在 64 位元版本中,在 Windows 64 位元版本的 Microsoft Office 2010年應用程式正確執行。

一般而言,當 VBA 巨集使用一些 Microsoft ActiveX Data Objects (ADO) 是平台相關的 Api 時,就會發生這個問題。比方說,您會執行類似下列的方式使用 ADO 資料錄集物件的 [ RecordCount ] 屬性的 VBA 巨集︰

Dim rs as ADODB.RecordseLONG recordCount


...
recordCount = rs.RecordCount

在這個範例中,您會收到 「 型別不相符 」 錯誤訊息,當您在 64 位元版本的 Office 2010 應用程式上執行此巨集。

注意事項

  • 您可以在下列的 Windows 作業系統中安裝 Office 2010 的 64 位元版本︰

    • 已安裝的 MSXML 6.0 的 64 位元版本的 Windows Server 2003 的 Service Pack 2

    • x64 為主的 Windows Vista Service Pack 1 及更新版本的版本

    • 64 位元版本的 Windows Server 2008 或更新版本

    • Windows 7 的 x64 架構版本

    • Windows Server 2008 R2

  • 若要檢視相依的平台的 ADO Api 的清單,請參閱

Need more help?

Want more options?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×