ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Required Fields for many Text boxes on a userform (https://www.excelbanter.com/excel-programming/387935-required-fields-many-text-boxes-userform.html)

Carlee

Required Fields for many Text boxes on a userform
 
Hi there,

I have user form containing approximately 90 textboxes, spread over 5 tabs.
75 of these fields are required for data entry.

Question:
Is there a function that i can use, and call on each text box, that checks
to see if the required fields on each tab contain data in it. if it doesn't,
i want to present a message to the user listing the fields that need to be
completed before the submission can be completed successfully, or the user
can move to the next tab.

Any ideas?
--
Carlee

Zigs

Required Fields for many Text boxes on a userform
 
Try this: for each textbox that you want to check create a change
event function that calls another function to test if Len$
(textboxControl.Text) = 0 or not.
If you don't want the "next" or "finish" button to be enabled
(btnControl.enabled = false or true) until the user enteres data into
all the required fields you can create a function that checks the Len$
(textboxControl.Text) = 0 for all of the controls and only if all of
the. The function would be called again from the _Change() events.

Hope that helps.

On Apr 22, 8:52 pm, Carlee wrote:
Hi there,

I have user form containing approximately 90 textboxes, spread over 5 tabs.
75 of these fields are required for data entry.

Question:
Is there a function that i can use, and call on each text box, that checks
to see if the required fields on each tab contain data in it. if it doesn't,
i want to present a message to the user listing the fields that need to be
completed before the submission can be completed successfully, or the user
can move to the next tab.

Any ideas?
--
Carlee





All times are GMT +1. The time now is 12:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com