Excel VB

Hi I want to change this code to add in another user so Richard Atkinson + Bob Smith not sure on how I do that is it an or ?



Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
 If Application.UserName = "Richard Atkinson" Then
    If WorksheetFunction.CountA(Sheets("Order Form").Range("K6,K7")) < 2 Then
        Msg = MsgBox("K6 and K7 need to be populated to continue - Thanks" _
                & vbCrLf & "Do you really want to save?", vbYesNo)
        If Msg = vbYes Then
            Cancel = False
        Else
            Cancel = True
        End If
    End If
RichardAtkAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Rob HensonConnect With a Mentor Finance AnalystCommented:
If Application.UserName = "Richard Atkinson" Or Application.UserName = "Bob Smith" Then
0
 
RichardAtkAuthor Commented:
Perfect thanks
0
All Courses

From novice to tech pro — start learning today.