翔羅武雅のブログ

翔羅武雅のブログ

ブログの説明を入力します。

Amebaでブログを始めよう!

Public Sub test1()
MsgBox "Hello"

End Sub

Public Sub test2()
    For a = 6 To 36
        If Cells(a, 6).Value <> "" And Cells(a, 7) = "" Then
            MsgBox "警告 " & a - 5 & "日の開始時間のみ入力されています"
            Cells(a, 6).Interior.ColorIndex = 3
           
        End If
    Next
   
     For b = 6 To 36
        If Cells(b, 7).Value <> "" And Cells(b, 6) = "" Then
            MsgBox "警告 " & CountNum - 5 & "日の終了時間のみ入力されています"
             Cells(b, 7).Interior.ColorIndex = 3
        End If
    Next
End Sub

Public Sub test3()
    For d = 6 To 36
        If Cells(d, 5).Value <> "" Then
            If Cells(d, 6).Value <> "" Then
                MsgBox "警告 " & -5 & "日の休暇希望日に勤務時間が記入されています"
                 Cells(d, 6).Interior.ColorIndex = 3
            End If
        End If
    Next
End Sub

Public Sub Test4()
 For e = 6 To 36
    If Cells(e, 6) > Cells(e, 7) Then
        MsgBox "警告" & e - 5 & "日の開始時間もしくは終了時間が間違っています"
         Cells(e, 6).Interior.ColorIndex = 3
    End If
Next
End Sub