hiko-blog

VBA業務改善

MENU

2024-03-27から1日間の記事一覧

処理を分岐

VBA

Sub MessagePrompt() Dim response As VbMsgBoxResult ' メッセージボックスを表示し、ユーザーからの応答を取得します response = MsgBox("処理を続行しますか?", vbYesNo + vbQuestion, "確認") ' ユーザーがYesを選択した場合の処理 If response = vbYes…

time計測

VBA

'time計測Dim ST As DoubleST = Timer '処理時間の取得Debug.Print Timer - STMsgBox "取得が完了しました" & vbLf & "実行時間は" & Format(Timer - ST, "0.000秒") & "でした" '//-------------------- Debug.Print Now() & Right(Format(Timer, "0.00"), …