coreyjames
Board Regular
- Joined
- Apr 19, 2011
- Messages
- 71
I am working on a template for my co workers and so far everything is working properly, but there is one feature I would like to add. Currently when you exit my template a pop up box will appear if not all Hospitals are listed in our analysis. This lets the employee give a reason as to why all Hospitals are not present in the data. I would like to revise this code so that the popup box tells the employee which hospitals are missing from the analysis. Please see my code below.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Sheets("HospitalSummary").Range("b10") < 24 And Sheets("HospitalSummary").Range("a11") = "" Then
Sheets("HospitalSummary").Range("a11") = InputBox("You Must First Explain Why All Hospitals are not Present in Analysis") This is where I would like it to tell me which hospitals are missing
End If
End Sub
Private Sub Workbook_Open()
End Sub
Thanks!
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If Sheets("HospitalSummary").Range("b10") < 24 And Sheets("HospitalSummary").Range("a11") = "" Then
Sheets("HospitalSummary").Range("a11") = InputBox("You Must First Explain Why All Hospitals are not Present in Analysis") This is where I would like it to tell me which hospitals are missing
End If
End Sub
Private Sub Workbook_Open()
End Sub
Thanks!