Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to have fields to be required Mandatory fields in Excel Excel Worksheet Functions 1 June 6th 08 10:41 PM
Required fields with comments Cathy Landry Excel Worksheet Functions 0 August 19th 05 06:18 PM
highlighting required fields maryann Excel Worksheet Functions 2 June 23rd 05 06:16 PM
Required fields Emily Excel Discussion (Misc queries) 1 June 23rd 05 12:59 AM
Required fields Lupe[_2_] Excel Programming 1 June 2nd 04 02:50 PM


All times are GMT +1. The time now is 10:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"