Best Practice

erutherford

Active Member
Joined
Dec 19, 2016
Messages
453
Curious as to the "best practice" regarding form development.
Say you have a simple form with a couple text boxes and an Add command button to capture the input. If you forget to put fill text box 1, it turns red, once filled it returns to yellow.

So is it "best practice" to code all that in the Add command button or at the text box level? I know it can be accomplished at both levels, but curious what the "best practice"?

I can see it being done at the Add command at simple levels, but maybe not as easy at a more complex levels.

thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Personally I would have the Add button hidden until all mandatory boxes are filled.
There is nothing worse than a msgbox that continually pops-up telling you to add something in the next box
 
Upvote 0
I like the idea of hiding the add button until the inputs are correct. You ok with msgbox popup if the input is incorrect in a required field or do you have a different way of handling it?
 
Upvote 0
A msgbox for data validation purposes is fine. Whilst you could just empty the field, it doesn't tell the user what they did wrong.
 
Upvote 0

Forum statistics

Threads
1,223,666
Messages
6,173,665
Members
452,527
Latest member
ineedexcelhelptoday

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top