Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
cell verification
I have a sheet that when users input data in column N they need to put a
reason in column O. How can I ensure that the reason in entered in column O before they save and close? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
cell verification
Right-click the excel LOGO near the File menu, select View code, paste this
in: Private Sub Workbook_BeforeClose(Cancel As Boolean) If Application.CountA(Sheets("Sheet1").Range("N:N")) < Application.CountA(Sheets("Sheet1").Range("O:O")) Then Cancel = True MsgBox "Before this file can be saved, each item in column N must have a reason in column O.", vbExclamation End If End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) If Application.CountA(Sheets("Sheet1").Range("N:N")) < Application.CountA(Sheets("Sheet1").Range("O:O")) Then Cancel = True MsgBox "Before this file can be saved, each item in column N must have a reason in column O.", vbExclamation End If End Sub Bob Umlas Excel MVP "Firkins" wrote in message ... I have a sheet that when users input data in column N they need to put a reason in column O. How can I ensure that the reason in entered in column O before they save and close? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
cell verification
Make the first Msgbox I suggested say "...can be closed..." instead of
"...can be saved..." Bob Umlas Excel MVP "Firkins" wrote in message ... I have a sheet that when users input data in column N they need to put a reason in column O. How can I ensure that the reason in entered in column O before they save and close? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Payroll verification hrs and time off | Excel Worksheet Functions | |||
General Cell Data Verification and Copy... | Excel Discussion (Misc queries) | |||
Date verification | Excel Discussion (Misc queries) | |||
Data Verification Problem | Excel Discussion (Misc queries) | |||
data verification | Excel Discussion (Misc queries) |