Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
I need some help making fields in Excel required. I'd like to make it so
that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
Are the text and check boxes on a user form or are they placed directly on a
worksheet? A user form would give you a greater amount of control. -- Kevin Backmann "Brian Boguhn" wrote: I need some help making fields in Excel required. I'd like to make it so that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
They are directly on a spreadsheet.
Brian "Kevin B" wrote: Are the text and check boxes on a user form or are they placed directly on a worksheet? A user form would give you a greater amount of control. -- Kevin Backmann "Brian Boguhn" wrote: I need some help making fields in Excel required. I'd like to make it so that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
I created 3 objects in a spreadsheet, 2 text boxes named txt1 and txt2, and a
check box named chk1. The following code in placed in the workbooks On Open If Me.chk1.Value = True And Len(Me.txt1) 0 And Len(Me.txt2) 0 Then Application.CommandBars("Worksheet Menu Bar").Enabled = True Else Application.CommandBars("Worksheet Menu Bar").Enabled = False End If I then added the same code to the on Change event for the 2 text boxes and the on click event for the check box Not particularly elegant, but it does the job of disabling the menu until the text boxes and check box have the correct values. To turn off the formatting and standard toolbars, repeat the Application.CommandBars statement changing the name from €śWorksheet Menu Bar€ť to €śStandard€ť and €śFormatting€ť to toggle those off/on as well. -- Kevin Backmann "Brian Boguhn" wrote: They are directly on a spreadsheet. Brian "Kevin B" wrote: Are the text and check boxes on a user form or are they placed directly on a worksheet? A user form would give you a greater amount of control. -- Kevin Backmann "Brian Boguhn" wrote: I need some help making fields in Excel required. I'd like to make it so that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
Additionally, you could protect the worksheet as well, for contents and
scenarios, but not objects, and then unprotect the worksheet when the textboxes and checkboxes have been properly populated. -- Kevin Backmann "Brian Boguhn" wrote: They are directly on a spreadsheet. Brian "Kevin B" wrote: Are the text and check boxes on a user form or are they placed directly on a worksheet? A user form would give you a greater amount of control. -- Kevin Backmann "Brian Boguhn" wrote: I need some help making fields in Excel required. I'd like to make it so that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Required fields
Thanks, I will try this.
"Kevin B" wrote: I created 3 objects in a spreadsheet, 2 text boxes named txt1 and txt2, and a check box named chk1. The following code in placed in the workbooks On Open If Me.chk1.Value = True And Len(Me.txt1) 0 And Len(Me.txt2) 0 Then Application.CommandBars("Worksheet Menu Bar").Enabled = True Else Application.CommandBars("Worksheet Menu Bar").Enabled = False End If I then added the same code to the on Change event for the 2 text boxes and the on click event for the check box Not particularly elegant, but it does the job of disabling the menu until the text boxes and check box have the correct values. To turn off the formatting and standard toolbars, repeat the Application.CommandBars statement changing the name from €śWorksheet Menu Bar€ť to €śStandard€ť and €śFormatting€ť to toggle those off/on as well. -- Kevin Backmann "Brian Boguhn" wrote: They are directly on a spreadsheet. Brian "Kevin B" wrote: Are the text and check boxes on a user form or are they placed directly on a worksheet? A user form would give you a greater amount of control. -- Kevin Backmann "Brian Boguhn" wrote: I need some help making fields in Excel required. I'd like to make it so that before someone can save a spreadsheet and/or e-mail it, all fields are filled out. Note that these fields are text boxes and check boxes. I'd appreciate suggestions. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to have fields to be required | Excel Worksheet Functions | |||
Required fields with comments | Excel Worksheet Functions | |||
highlighting required fields | Excel Worksheet Functions | |||
Required fields | Excel Discussion (Misc queries) | |||
Required fields | Excel Programming |