Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Value must be entered

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

--
Gary''s Student - gsnu200786


"JStiehl" wrote:

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.

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
If a date entered bollard Excel Worksheet Functions 4 April 19th 07 05:56 PM
Display last row entered tallpaul New Users to Excel 2 December 29th 05 09:57 PM
row shading when a value of 0 is entered at the end of the row fomula problems Excel Worksheet Functions 4 October 22nd 05 09:09 PM
Warn if already entered Pat Excel Worksheet Functions 3 February 17th 05 09:14 AM
No value entered WannaKooky Excel Worksheet Functions 2 November 1st 04 03:51 PM


All times are GMT +1. The time now is 05:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"