Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Making a Textbox Required Field

How would I make a textbox a required field for the user to enter information?

Thanks

Linda
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Making a Textbox Required Field

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Making a Textbox Required Field

Thanks Works Great

"ryguy7272" wrote:

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Making a Textbox Required Field

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

"ryguy7272" wrote:

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Making a Textbox Required Field

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--

--
RyGuy


"LRay67" wrote:

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

"ryguy7272" wrote:

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Making a Textbox Required Field

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?

"ryguy7272" wrote:

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--

--
RyGuy


"LRay67" wrote:

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

"ryguy7272" wrote:

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default Making a Textbox Required Field

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---


--
RyGuy


"LRay67" wrote:

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?

"ryguy7272" wrote:

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--

--
RyGuy


"LRay67" wrote:

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

"ryguy7272" wrote:

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--


--
RyGuy


"LRay67" wrote:

How would I make a textbox a required field for the user to enter information?

Thanks

Linda

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
Making a column or cell required smistretta New Users to Excel 4 April 27th 06 01:08 AM
Making a particular cell or column required Ronco Excel Discussion (Misc queries) 0 April 26th 06 09:01 PM
Making a particular cell or column required Miguel Zapico Excel Discussion (Misc queries) 0 April 26th 06 07:44 PM
Making a particular cell or column required Dave O Excel Discussion (Misc queries) 0 April 26th 06 07:34 PM
Field Required if another field is checked ** Kelly ******** Excel Programming 1 August 20th 03 10:44 PM


All times are GMT +1. The time now is 02:46 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"