Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Users are downloading a spreadsheet where they should be filling in important
values to HR such as Name, Last Name, Social Security, etc. Besides there are other values such as Standard number of hours they work (20, 37.5, 40, etc) that are being used to calculate overtime, benefits, etc. so they must be filled in. Is there a way to make these fields required before printing/saving the spreadsheet? Thank you! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pilar, here is one way, change the range to the cells you want
Private Sub Workbook_BeforePrint(Cancel As Boolean) Dim test_rng As Range Dim ret_str As String Dim cell As Range 'change to your range Set test_rng = ActiveSheet.Range("A1:A5,B1") For Each cell In test_rng If cell.Value = "" Then If ret_str = "" Then ret_str = cell.Address Else ret_str = ret_str & " and " & cell.Address End If End If Next If ret_str < "" Then MsgBox "There is information missing in cell(s): " & ret_str Cancel = True Else End If End Sub -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2000 & 2003 ** remove news from my email address to reply by email ** "Pilar" wrote in message ... Users are downloading a spreadsheet where they should be filling in important values to HR such as Name, Last Name, Social Security, etc. Besides there are other values such as Standard number of hours they work (20, 37.5, 40, etc) that are being used to calculate overtime, benefits, etc. so they must be filled in. Is there a way to make these fields required before printing/saving the spreadsheet? Thank you! |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See Events at Chip Pearson's site
http://www.cpearson.com/excel/events.htm look at the BeforePrint, BeforeSave and BeforeClose events. You also might want to look at the selectionchange and change events. -- Regards, Tom Ogilvy "Pilar" wrote in message ... Users are downloading a spreadsheet where they should be filling in important values to HR such as Name, Last Name, Social Security, etc. Besides there are other values such as Standard number of hours they work (20, 37.5, 40, etc) that are being used to calculate overtime, benefits, etc. so they must be filled in. Is there a way to make these fields required before printing/saving the spreadsheet? Thank you! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I make a cell required to have input? | Excel Discussion (Misc queries) | |||
is it possible to make a cell in excel as entry required | Excel Discussion (Misc queries) | |||
can you make a cell value required? | Excel Discussion (Misc queries) | |||
how to make a cell required in excel | Excel Discussion (Misc queries) | |||
how do I make a cell in Excel required to be populated? | Excel Discussion (Misc queries) |