Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Making a Textbox Required Field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
LRay67 - 25 Mar 2008 14:14 GMT
How would I make a textbox a required field for the user to enter information?

Thanks

Linda
ryguy7272 - 25 Mar 2008 15:16 GMT
This (simple) technique works great for me:

Sub
   If TextBox1 = "" Then
   MsgBox "Please enter a value for 'whatever'!!"
   Exit Sub
   End If
End Sub

Regards,
Ryan--

Signature

RyGuy

> How would I make a textbox a required field for the user to enter information?
>
> Thanks
>
> Linda
LRay67 - 25 Mar 2008 16:33 GMT
Thanks Works Great

> This (simple) technique works great for me:
>
[quoted text clipped - 13 lines]
> >
> > Linda
LRay67 - 25 Mar 2008 17:45 GMT
That works great, maybe you could help me....My boss would like these
required fields to be check upon saving the workbook.  Any suggestions?

Linda

> This (simple) technique works great for me:
>
[quoted text clipped - 13 lines]
> >
> > Linda
ryguy7272 - 26 Mar 2008 14:25 GMT
Hummm, not sure what you mean 'required fields to be check upon saving'.  Can
you give me a more detailed example?  You can't move out of the
current/active UserForm when you use the code I gave you on each TextBox --
the code prevents you from moving to the next UserForm until all the
TextBoxes on the current UserFrom have been filled out (or filled in...never
understood the difference).

Regards,
Ryan--

Signature

RyGuy

> That works great, maybe you could help me....My boss would like these
> required fields to be check upon saving the workbook.  Any suggestions?
[quoted text clipped - 18 lines]
> > >
> > > Linda
LRay67 - 27 Mar 2008 15:17 GMT
Well boss is ditching the upon saving....you stated that they can't move onto
the next UserForm without filling in these textboxes on the UserForm.   Would
if I am using just the worksheet instead of a UserForm.....It will bring up
the message box, but does not stop them from moving on to next worksheet/tab
per say?  

> Hummm, not sure what you mean 'required fields to be check upon saving'.  Can
> you give me a more detailed example?  You can't move out of the
[quoted text clipped - 28 lines]
> > > >
> > > > Linda
ryguy7272 - 31 Mar 2008 16:51 GMT
Well, that is totally different; a worksheet is totally different from a
UserForm.  If you are in the UserForm environment, the code prevents you from
moving out of the UserForm.  If you are working on the Sheet, then you are
not in the UserForm environment and thus the code is ignored.

Regrads,
Ryan---

Signature

RyGuy

> Well boss is ditching the upon saving....you stated that they can't move onto
> the next UserForm without filling in these textboxes on the UserForm.   Would
[quoted text clipped - 34 lines]
> > > > >
> > > > > Linda

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.