Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
you could use the before save event to check certain cells for input. but since you didn't give a lot of details, i can only give a overly simple answer. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim r As Range Set r = Sheets("sheet1").Range("A2") If r = "" Then MsgBox "the require entry at " & r.Address & " need data!" r.Select Cancel = True End If End Sub the above only check 1 cell and cancels save if no data in the cell. you would need to reset r to the various cells that need input. not sure how many you have. regards FSt1 "Bob Ptacek" wrote: Is there something that can be checked if the "Save" function is executed. I have a file with a number of worksheets and I don't want a user to be able to save it without entering some data. Once the "save" is selected I would like to check to see if all required fields are still empty so I can display an error |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Checking empty cells | Excel Programming | |||
Checking for Empty Scattered Cells | Excel Programming | |||
Checking for empty cells in a range | Excel Worksheet Functions | |||
Checking if an Excel file is empty? | Excel Programming | |||
checking if file is saved | Excel Programming |