3

プログラムは私のPCで1〜2秒かかります

速度が低下するのは回線で発生し Debug.Print Err.Description
ます。Err.numberに置き換えると、0秒かかります。

Type Mismatchエラーメッセージを表示するようにコードを変更した場合、問題が発生します

私はExcel2007、64ビットWindowsServerを使用しています。

すべてのアドインを無効にしました

次のコードを新しい.xlsmファイルに入れました。

問題はdebug.printに関するものではありません。文字列の比較に変更すると、問題が発生します。

Private Declare Function GetTickCount Lib "kernel32" () As Long

Public Sub Testing()
Err.Clear
Application.DisplayAlerts = False
Application.CutCopyMode = False
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Application.EnableEvents = False
On Error GoTo Problem

    Dim a As Double
    a = 10 / 0
Problem:
    Dim sOutput As String
    Dim lStart As Long, lEnd As Long


    lStart = GetTickCount
    Debug.Print Err.Description
    lEnd = GetTickCount
    gsOutput = "Time requires : " & (lEnd - lStart) / 1000 & "s"
    Debug.Print gsOutput
End Sub

どんな助けでもいいでしょう。

見つかった問題と解決策の編集: http ://support.microsoft.com/kb/2683270

ちなみに、問題がマイクロソフトによって述べられている場合、これはローカライズされた質問ではないと思います。

4

1 に答える 1

1

Basically the problem is because some registry value is missing on local computer.

As suggested here

the winhelp.ini, which is used by Excel Process during error handling is missing ( You can check by using the tool suggested.)

Therefore, it's looking up from some other %PATH% variable into network drive's C:\Windows\winhelp.ini.

the 1-2 Seconds are network delay.

The problem is solved by adding the registry mentioned.

HTH

于 2013-03-01T10:02:44.420 に答える