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 / General Excel Questions / May 2008

Tip: Looking for answers? Try searching our database.

Value must be entered

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JStiehl - 16 May 2008 13:46 GMT
Is it possible to require a value to be entered into a cell, and give a
warning if no value is entered?  Is it possible to prevent someone who is
entering data in the form from moving to the next cell until this required
data is entered?  Thanks for your help.
Gary''s Student - 16 May 2008 14:10 GMT
This is an example using cell B9.  Once the cell is selected, a value must be
entered before the user can navigate elsewhere.

Put this event macro in the worksheet code area

Public b9 As Boolean

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set r = Range("B9")
If Intersect(Target, r) Is Nothing Then
   If b9 Then
       If IsEmpty(r) Then
           MsgBox ("B9 must be filled")
           r.Select
       Else
           b9 = False
       End If
   End If
Else
   b9 = True
End If
End Sub

Signature

Gary''s Student - gsnu200786

> Is it possible to require a value to be entered into a cell, and give a
> warning if no value is entered?  Is it possible to prevent someone who is
> entering data in the form from moving to the next cell until this required
> data is entered?  Thanks for your help.
 
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.