返回列表 上一主題 發帖

[發問] 別台開啟VBA後,點控制按鈕卻沒反應(已經爬過很多很多文...)

回復 3# clietj37

大大你好,剛才已經看過你的提供的解決方式。因為有些電腦仍然不成功。所以我參考文章中的Additional Step

Additional step:

If the steps above do not resolve your issue, another step that can be tested (see warning below):

On a fully updated machine and after removing the .exd files, open the file in Excel with edit permissions.

Open Visual Basic for Applications > modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject.

Save and reopen the file. Test for resolution. If resolved, provide this updated project to additional users.

Warning: If this step resolves your issue, be aware that after deploying this updated project to the other users, these users will also need to have the updates applied on their systems and .exd files removed as well.


看得不是很懂"modify the project by adding a comment or edit of some kind to any code module > Debug > Compile VBAProject."是要做什麼? 是隨便編輯VBA中任何內容嗎? Debug 跟 Compile VBAProject 每個字都知道意思,但加起來就不知道實際要進行什麼動作...?{:3_60:}

但我隨便編輯一下後重開檔案就出現我在#4描述的情況。求大神解惑~~

TOP

謝謝兩位的回覆,我用#2的方式測試了4台電腦,把電腦更新到最新後,至https://support.microsoft.com/kb/3025036/zh-tw 下載microsoft fix,有2台成功可以用activeX控制項,有2台依然沒反應。

剛才再參考#3大大提供的文章,發現失敗的電腦都有一個共通點。
當我開啟包括ActiveX的Excel後,測試發現不成功後。無論有否更改Excel任何內容,只要我存檔後重開檔案,都會出現下圖畫面。


請問是發生什麼事呢?

TOP

起因於更新了office patch
我是參考這一篇解決
http://stackoverflow.com/questions/27411399/microsoft-excel-activex-controls-disabled

TOP

Private Sub CommandButton1_Click()
VBAProject.UserForm1.Show
End Sub

關閉所有 Office 相關的軟體,開啟檔案總管,切換至路徑 C:\Users\ [使用者名稱] \AppData\Local\Temp\Excel8.0 和 C:\Users\ [使用者名稱] \AppData\Local\Temp\VBE,將 MSForms.exd 更名或刪除後,重新開啟 Excel 進行測試或微軟網址說明https://support.microsoft.com/kb/3025036/zh-tw

TOP

        靜思自在 : 站在半路,比走到目標更辛苦。
返回列表 上一主題