OORAM

Video here from me

Excel file to use with the below code OORAM_Airway_Management_Log_4.29.20_noPHI_edited_5.1.20_noPW.xlsm: here

Workbook Open

workbook open


For UserForm1

UserForm1

comboBox list

Private Sub CommandButton1_Click()
Dim lngRow As Long


Worksheets("Aggregate").Activate
lngRow = Worksheets("Aggregate").Range("A1048576").End(xlUp).Row + 1

Cells(lngRow, 1) = txtProvID.Value
Cells(lngRow, 2) = cbProvidersList.Value
Cells(lngRow, 3) = cbCert.Value
Cells(lngRow, 4) = txtPt.Value
Cells(lngRow, 5) = txtDateIntub.Value
Cells(lngRow, 6) = cbLocation.Value
Cells(lngRow, 7) = txtIndication.Value
Cells(lngRow, 8) = cboxSedation.Value
Cells(lngRow, 9) = cboxNM.Value
Cells(lngRow, 10) = txtTubeSize.Value
Cells(lngRow, 11) = txtAttempts.Value
Cells(lngRow, 12) = cbFirstSuccess.Value
Cells(lngRow, 13) = cbEsophIntub.Value
Cells(lngRow, 14) = txtETCO2.Value
Cells(lngRow, 15) = cbOutcome.Value
Cells(lngRow, 16) = cbComplications.Value
Cells(lngRow, 17) = cbDifficulty.Value
Cells(lngRow, 18) = cbKing.Value
Cells(lngRow, 19) = cbVideoScope.Value
Cells(lngRow, 20) = cbBVMUsed.Value
Cells(lngRow, 21) = cbOralAdjunct.Value
Cells(lngRow, 22) = cbNPA.Value
Cells(lngRow, 23) = cbNote.Value
Cells(lngRow, 24) = txtTimeOfDay.Value
Cells(lngRow, 25) = cboxDay.Value
Cells(lngRow, 26) = txtMoreDetails.Value
Cells(lngRow, 27) = txtAreasConcern.Value
Cells(lngRow, 27).Activate

If Me.cbCert.Value = True Then
Sheets("Aggregate").Cells(lngRow, 3).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 3).Value = "FALSE"
End If

If Me.cbFirstSuccess.Value = True Then
Sheets("Aggregate").Cells(lngRow, 12).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 12).Value = "FALSE"
End If

If Me.cbEsophIntub.Value = True Then
Sheets("Aggregate").Cells(lngRow, 13).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 13).Value = "FALSE"
End If

If Me.cbKing.Value = True Then
Sheets("Aggregate").Cells(lngRow, 18).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 18).Value = "FALSE"
End If

If Me.cbVideoScope.Value = True Then
Sheets("Aggregate").Cells(lngRow, 19).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 19).Value = "FALSE"
End If

If Me.cbBVMUsed.Value = True Then
Sheets("Aggregate").Cells(lngRow, 20).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 20).Value = "FALSE"
End If

If Me.cbOralAdjunct.Value = True Then
Sheets("Aggregate").Cells(lngRow, 21).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 21).Value = "FALSE"
End If

If Me.cbNPA.Value = True Then
Sheets("Aggregate").Cells(lngRow, 22).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 22).Value = "FALSE"
End If

If Me.cbNote.Value = True Then
Sheets("Aggregate").Cells(lngRow, 23).Value = "TRUE"
Else
Sheets("Aggregate").Cells(lngRow, 23).Value = "FALSE"
End If

Clear_Form

End Sub

Private Sub btnCurrentTime_Click()
MsgBox Format(Now(), "mmmm dd, yyyy, dddd hh:mm AMPM")
End Sub

Private Sub btnEnterDate_Click()
UserForm7.Show
End Sub

Private Sub CommandButton3_Click()
'find pt last name last 4
Worksheets("NLtest1").Select
Sheets("NLtest1").Range("D1").ClearContents
Sheets("NLtest1").Range("A3:AA25").ClearContents
Range("D1").Select
Unload Me
End Sub

Private Sub CommandButton2_Click()
'find pt last name last 4
Worksheets("Aggregate").Select
Sheets("Aggregate").Range("AF2").ClearContents
Sheets("Aggregate").Range("AC6:BE17").ClearContents
Range("AF2").Select

Unload Me
End Sub


Private Sub btnFindRangeIntub_Click()
UserForm9.Show
End Sub

Private Sub btnGoToSelProv_Click()
UserForm10.Show
End Sub

Private Sub btnReset_Click()

For Each ctrl In Me.Controls

Select Case TypeName(ctrl)
    Case "TextBox"
        ctrl.Text = ""
    Case "OptionButton"
        ctrl.Value = False
    Case "CheckBox"
        ctrl.Value = False
    
End Select
Next
End Sub

Private Sub btnShowExp_Click()
UserForm3.Show
End Sub

Private Sub btnShowProvID_Click()
UserForm2.Show
End Sub

Private Sub cmdGoToDash_Click()
UserForm13.Show
End Sub

Private Sub btnGoAgg_Click()
Worksheets("Aggregate").Select
Worksheets("Aggregate").Range("A1").End(xlDown).Offset(1, 0).Select
Unload Me ' unloads the userform
End Sub


For UserForm2

UserForm2       UserForm2-a


For UserForm3

UserForm3rev

Private Sub btnFindID_Click()
UserForm2.Show
End Sub

Private Sub btnSubmit1_Click()
Dim a As Long
Dim k As Range
a = Me.TextBox1.Value

Set k = Sheets("DueDates1").Range("A:A")

r = Application.WorksheetFunction.Match(a, k, 0)


Me.TextBox2.Value = Sheets("DueDates1").Cells(r, 2).Value
Me.TextBox3.Value = Sheets("DueDates1").Cells(r, 3).Value
Me.TextBox4.Value = Sheets("DueDates1").Cells(r, 4).Value

End Sub

Private Sub clearForm_Click()

For Each ctrl In Me.Controls


Select Case TypeName(ctrl)
    Case "TextBox"
        ctrl.Text = ""
    
End Select

Next

End Sub

Private Sub cmdQuit1d_Click()
Unload Me
End Sub


For Userform 4:  uses tab DueDates1

Private Sub btnRefreshAll_Click()    'this is the Refresh Provider Expiration List button
ActiveWorkbook.Sheets("DueDates1").Activate

Dim mydate1 As Date
Dim mydate2 As Long
Dim datetoday1 As Date
Dim datetoday2 As Long

Dim x As Long
LastRow = Sheets("DueDates1").Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To LastRow

mydate1 = Cells(x, 4).Value
mydate2 = mydate1 'this converts mydate1 to a number

Cells(x, 8).Value = mydate2

datetoday1 = Date
datetoday2 = datetoday1

Cells(x, 9).Value = datetoday2

If (mydate2 - datetoday2) > 0 And (mydate2 - datetoday2) <= 60 Then

Cells(x, 5) = "Expires within 60 d from today!"
Cells(x, 5).Interior.ColorIndex = 6
Cells(x, 5).Font.ColorIndex = 1
Cells(x, 5).Font.Bold = True
Cells(x, 7).Value = mydate2 - datetoday2
Else

If (mydate2 - datetoday2) <= 0 Then
Cells(x, 5) = "Expired!"
Cells(x, 5).Interior.ColorIndex = 3
Cells(x, 5).Font.ColorIndex = 1
Cells(x, 5).Font.Bold = True
Cells(x, 7).Value = mydate2 - datetoday2
End If

If (mydate2 - datetoday2) > 60 Then
Cells(x, 5) = "OK!"
Cells(x, 5).Interior.ColorIndex = 4
Cells(x, 5).Font.ColorIndex = 1
Cells(x, 5).Font.Bold = True
Cells(x, 7).Value = mydate2 - datetoday2

End If
End If
Next

'Worksheets("DueDates1").Calculate

MsgBox "List Refreshed", vbOKCancel

End Sub

DueDates1          UserForm4

Private Sub cmdQuit1a_Click()   'this is the "Quit" button
Unload Me
End Sub

userform4a


For UserForm 5

Private Sub btnRefreshExp_Click()
Dim i, LastRow
LastRow = Sheets("DueDates1").Range("A" & Rows.Count).End(xlUp).Row
Sheets("ExpList").Range("A2:I500").ClearContents
For i = 2 To LastRow
If Sheets("DueDates1").Cells(i, "E").Value = "Expired!" Then
Sheets("DueDates1").Cells(i, "E").EntireRow.Copy Destination:=Sheets("ExpList").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
MsgBox "List Refreshed", vbOKCancel
End Sub

Private Sub cmdClear5_Click()
Sheets("ExpList").Range("A2:Y1000").ClearContents
End Sub

Private Sub cmdQuit1b_Click()
Unload Me

End Sub

UserForm5

userform5a


For UserForm6

Private Sub btnRefreshExp60_Click()
Dim i, LastRow
LastRow = Sheets("DueDates1").Range("A" & Rows.Count).End(xlUp).Row
Sheets("Exp60").Range("A2:I500").ClearContents
For i = 2 To LastRow
If Sheets("DueDates1").Cells(i, "E").Value = "Expires within 60 d from today!" Then
Sheets("DueDates1").Cells(i, "E").EntireRow.Copy Destination:=Sheets("Exp60").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
MsgBox "List Refreshed", vbOKCancel
End Sub

Private Sub cmdClear6_Click()
Sheets("Exp60").Range("A2:I500").ClearContents
End Sub

Private Sub cmdQuit1c_Click()
Unload Me

End Sub

UserForm6

userform6a


For UserForm9

UserForm9

userform9a

Private Sub btnEnterRange_Click()
Dim a As Long

Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If

Dim dEndDateb4 As String
Dim dEndDate As Date

dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


Dim i, LastRow
Dim LastRow1 As Long
LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row
Sheets("DateRanges").Range("A2:AX100").ClearContents
For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "E").Value > dStartDate And Sheets("Aggregate").Cells(i, "E").Value < dEndDate Then
'Sheets("Aggregate").Cells(i, "E").EntireRow.Copy Destination:=Sheets("DateRanges").Range("A" & Rows.Count).End(xlUp).Offset(1)

'Sheets("Aggregate").Intersect(Cells(i, "E").EntireRow, Columns("A:G")).Copy Destination:=Sheets("DateRanges").Range("A" & Rows.Count).End(xlUp).Offset(1)
'Sheets("Aggregate").Range(Sheets("Aggregate").Cells(i, "E"), Sheets("Aggregate").Cells(i, "G")).Copy Destination:=Sheets("DateRanges").Range("A" & Rows.Count).End(xlUp).Offset(1)
Sheets("Aggregate").Range("A" & i, "G" & i).Copy Destination:=Sheets("DateRanges").Range("A" & Rows.Count).End(xlUp).Offset(1)

End If
Next i

LastRow1 = ThisWorkbook.Sheets("DateRanges").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox LastRow1 & " intubation(s) were performed at FHCC between " & dStartDate & " and " & dEndDate, vbOKCancel
LastRow1 = 0
'MsgBox "List Refreshed", vbOKCancel

End Sub

Private Sub btnQuit1a_Click()
Unload Me

End Sub

Private Sub btnReset1a_Click()
For Each ctrl In Me.Controls


Select Case TypeName(ctrl)
    Case "TextBox"
        ctrl.Text = ""
    
End Select

Next
Sheets("DateRanges").Range("A2:AX100").ClearContents
End Sub


For UserForm10

UserForm10

userform10aa

Private Sub btnSelProvDateRange_Click()
If Me.txtSelProvDateRange = "" Then
MsgBox "Please Enter a Number in the ENTER PROVIDER ID box", vbOKCancel
Exit Sub
End If


Dim a As Long
a = Me.txtSelProvDateRange.Value

Dim i, LastRow
Dim LastRow1 As Long

Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")

If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If

Dim dEndDateb4 As String
Dim dEndDate As Date

dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row
Sheets("SelProvDateRanges").Range("A2:AX100").ClearContents
For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "A").Value = a And Sheets("Aggregate").Cells(i, "E").Value > dStartDate And Sheets("Aggregate").Cells(i, "E").Value < dEndDate Then

Sheets("Aggregate").Cells(i, "A").EntireRow.Copy Destination:=Sheets("SelProvDateRanges").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
LastRow1 = ThisWorkbook.Sheets("SelProvDateRanges").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox ThisWorkbook.Sheets("SelProvDateRanges").Range("B2").Value & " performed " & LastRow1 & " intubation(s) between " & dStartDate & " and " & dEndDate, vbOKCancel
LastRow1 = 0


End Sub

Private Sub btnQuit3_Click()
Unload Me
End Sub

Private Sub btnReset3a_Click()
For Each ctrl In Me.Controls
Select Case TypeName(ctrl)
    Case "TextBox"
        ctrl.Text = ""
    
End Select

Next
Sheets("SelProvDateRanges").Range("A2:AX100").ClearContents
End Sub


For UserForm 11

UserForm11

userform11a

Private Sub cmdShowComplicn1_Click()

Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")
'dStartDate = CDate(InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy"))
If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If

Dim dEndDateb4 As String
Dim dEndDate As Date

dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


Sheets("Complicns").Range("A2:Y1000").ClearContents
Dim i, LastRow
Dim LastRow1 As Long

LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row

For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "P").Value <> "None" And Sheets("Aggregate").Cells(i, "P").Value <> "NONE" And Sheets("Aggregate").Cells(i, "E").Value >= dStartDate And Sheets("Aggregate").Cells(i, "E").Value <= dEndDate Then

Sheets("Aggregate").Cells(i, "P").EntireRow.Copy Destination:=Sheets("Complicns").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
LastRow1 = Sheets("Complicns").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox " There were " & LastRow1 & " complications during intubations between " & dStartDate & " and " & dEndDate, vbOKCancel
' between " & dStartDate & " and " & dEndDate

LastRow1 = 0

End Sub

Private Sub cmdQuit1d_Click()
Unload Me

End Sub

Private Sub cmdClearList1_Click()
Sheets("Complicns").Range("A2:Y1000").ClearContents

End Sub


For UserForm12

UserForm12

Private Sub cmdRefreshUncert_Click()

Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")
'dStartDate = CDate(InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy"))
If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If

Dim dEndDateb4 As String
Dim dEndDate As Date

dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


Sheets("Uncert").Range("A2:Y1000").ClearContents
Dim i, LastRow
Dim LastRow1 As Long
Dim result As String
result = Sheets("Aggregate").Range("C403").Value

LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row

For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "C").Value <> result And Sheets("Aggregate").Cells(i, "C").Value <> "TRUE" And Sheets("Aggregate").Cells(i, "C").Value <> "NA" And Sheets("Aggregate").Cells(i, "E").Value >= dStartDate And Sheets("Aggregate").Cells(i, "E").Value <= dEndDate Then

Sheets("Aggregate").Cells(i, "C").EntireRow.Copy Destination:=Sheets("Uncert").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
LastRow1 = Sheets("Uncert").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox " There was/were " & LastRow1 & " OORAM-uncertified intubation(s) between " & dStartDate & " and " & dEndDate, vbOKCancel

LastRow1 = 0

End Sub

Private Sub cmdReset12_Click()
Sheets("Uncert").Range("A2:Y1000").ClearContents
End Sub

Private Sub cmdQuit12_Click()
Unload Me

End Sub


For UserForm13

UserForm13

Private Sub btnFindRangeIntub_Click()
UserForm9.Show
End Sub

Private Sub btnGoToSelProv_Click()
UserForm10.Show
End Sub

Private Sub btnShow60d_Click()
UserForm6.Show
End Sub

Private Sub btnShowAllDates_Click()
UserForm4.Show
End Sub

Private Sub btnShowExpired_Click()
UserForm5.Show
End Sub

Private Sub cmdConcern13_Click()
UserForm15.Show

End Sub

Private Sub cmdNoNote_Click()
UserForm14.Show


End Sub

Private Sub cmdQuit13_Click()
Unload Me

End Sub

Private Sub cmdShowComplicn_Click()
UserForm11.Show
End Sub

Private Sub cmdShowNonCert_Click()
UserForm12.Show
End Sub
 


For UserForm 14

UserForm14

UserForm14a

Private Sub cmdShowNoNote_Click()
Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")
'dStartDate = CDate(InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy"))
If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If

Dim dEndDateb4 As String
Dim dEndDate As Date

dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If

If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


Sheets("NoNote").Range("A2:Z100").ClearContents
Dim i, LastRow
Dim LastRow1 As Long
Dim result As String
result = Sheets("Aggregate").Range("W309").Value

LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row

For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "W").Value <> result And Sheets("Aggregate").Cells(i, "W").Value <> "True" And Sheets("Aggregate").Cells(i, "W").Value <> "NA" And Sheets("Aggregate").Cells(i, "E").Value >= dStartDate And Sheets("Aggregate").Cells(i, "E").Value <= dEndDate Then

Sheets("Aggregate").Cells(i, "W").EntireRow.Copy Destination:=Sheets("NoNote").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
LastRow1 = Sheets("NoNote").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox " There was/were no OORAM note for " & LastRow1 & " intubation(s) between " & dStartDate & " and " & dEndDate, vbOKCancel

LastRow1 = 0
End Sub
 

Private Sub cmdClear14_Click()
Sheets("NoNote").Range("A2:Z100").ClearContents
End Sub

Private Sub cmdQuit14_Click()
Unload Me
End Sub


For UserForm 15

UserForm15aa

UserForm15a

Private Sub cmdConcern_Click()

Dim dStartDateb4 As String
Dim dStartDate As Date

dStartDateb4 = InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy")
'dStartDate = CDate(InputBox("Enter Start Date", "Valid Format = mm/dd/yyyy"))
If StrPtr(dStartDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If


If IsDate(dStartDateb4) Then
    dStartDate = CDate(dStartDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


Dim dEndDateb4 As String
Dim dEndDate As Date


dEndDateb4 = InputBox("Enter End Date", "Valid Format = mm/dd/yyyy")
If StrPtr(dEndDateb4) = 0 Then
    MsgBox "Cancel Pressed"
    Exit Sub
End If


If IsDate(dEndDateb4) Then
    dEndDate = CDate(dEndDateb4)
Else
    MsgBox "Bad Data Entry!"
    Exit Sub
End If


 
Sheets("Concern").Range("A2:Z400").ClearContents
Dim i, LastRow
Dim LastRow1 As Long
'Dim result As String
'result = Sheets("Aggregate").Range("Y2").Value
'MsgBox " The value is " & result

LastRow = Sheets("Aggregate").Range("A" & Rows.Count).End(xlUp).Row

For i = 2 To LastRow
If Sheets("Aggregate").Cells(i, "AA").Value <> "" And Sheets("Aggregate").Cells(i, "E").Value >= dStartDate And Sheets("Aggregate").Cells(i, "E").Value <= dEndDate Then


Sheets("Aggregate").Cells(i, "AA").EntireRow.Copy Destination:=Sheets("Concern").Range("A" & Rows.Count).End(xlUp).Offset(1)
End If
Next i
LastRow1 = Sheets("Concern").Cells(Rows.Count, 1).End(xlUp).Offset(-1).Row
MsgBox " There was/were " & LastRow1 & " provider concerns with intubation(s) between " & dStartDate & " and " & dEndDate, vbOKCancel
 
LastRow1 = 0

End Sub


Private Sub cmdQuit15_Click()
Unload Me

End Sub

Private Sub cmdClear15_Click()
Sheets("Concern").Range("A2:AA100").ClearContents
End Sub


For UserForm 16

UserForm16

Private Sub cmdGoBack_Click()
Me.Hide
UserForm15.Show
End Sub