- Excel VBA 質問スレ Part65
66 :デフォルトの名無しさん (ワッチョイ 5e46-k/jz)[]:2020/03/26(木) 15:56:47.70 ID:ZD929brT0 - 以下RUNすると、"!ALARM()が見つかりません。”ってエラーになる。
何故ですか? Public FLG As Integer Private Sub CommandButton1_Click() With Sheet1 Cells(2, 1) = Date Cells(2, 2) = Time If FLG = 1 Then FLG = 0 CommandButton1.Caption = "ON" Else FLG = 1 CommandButton1.Caption = "OFF" Call OnTimeStart End If End With FLG = 0 End Sub Sub OnTimeStart() With Sheet1 Application.OnTime Now + TimeValue("00:00:05"), "ALARM" End With End Sub Sub ALARM() With Sheet1 Cells(2, 1) = Date Cells(2, 2) = Time End With End Sub
|