debug: D3セルの状態メッセージをイミディエイトウィンドウにも出力
処理開始/完了/失敗のD3表示内容を[D3]プレフィックス付きでDebug.Printし、フリーズ調査時にログだけで状態を追えるようにした。 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
49ef4c5358
commit
97f371db3f
@ -37,6 +37,7 @@ Sub run()
|
|||||||
|
|
||||||
defaultSh.Range("D4").Value = Now
|
defaultSh.Range("D4").Value = Now
|
||||||
defaultSh.Range("D3").Value = "取込処理中..."
|
defaultSh.Range("D3").Value = "取込処理中..."
|
||||||
|
Debug.Print "[D3] " & defaultSh.Range("D3").Value
|
||||||
Application.ScreenUpdating = False '画面更新停止
|
Application.ScreenUpdating = False '画面更新停止
|
||||||
Application.Calculation = xlManual '自動計算停止
|
Application.Calculation = xlManual '自動計算停止
|
||||||
'------------------------------------------
|
'------------------------------------------
|
||||||
@ -58,11 +59,14 @@ Cleanup:
|
|||||||
|
|
||||||
If Err.Number <> 0 Then
|
If Err.Number <> 0 Then
|
||||||
defaultSh.Range("D3").Value = "取込処理失敗(エラー): " & Err.Description
|
defaultSh.Range("D3").Value = "取込処理失敗(エラー): " & Err.Description
|
||||||
|
Debug.Print "[D3] " & defaultSh.Range("D3").Value
|
||||||
Err.Clear
|
Err.Clear
|
||||||
ElseIf Not (exportSuccess And getSuccess) Then
|
ElseIf Not (exportSuccess And getSuccess) Then
|
||||||
defaultSh.Range("D3").Value = "取込処理失敗(データ取得エラー)"
|
defaultSh.Range("D3").Value = "取込処理失敗(データ取得エラー)"
|
||||||
|
Debug.Print "[D3] " & defaultSh.Range("D3").Value
|
||||||
Else
|
Else
|
||||||
defaultSh.Range("D3").Value = "取込処理完了"
|
defaultSh.Range("D3").Value = "取込処理完了"
|
||||||
|
Debug.Print "[D3] " & defaultSh.Range("D3").Value
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user