View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Test for range value

Hi,

I'm not sure how the question related to the code you posted so I offer this
suggestion without any of your code

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
If Target = Cells(1, 5) Then
If Target.Value = "" Then
MsgBox "You clicked in the wrong place"
Else
myval = Target.Value
Lost_And_Found.Show
End If
End If
End Sub

Mike

"Patrick C. Simonds" wrote:

Is there a way to have this check the rng(1, 5) for a value.

If the value is blank I need to fire a msgbox "Sorry but you have clicked to
far down on the worksheet. Please select the next blank row."

If the value is not blank then show the UserForm.



Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)

If bSELCTIONCHANGE Then

If Not Application.Intersect(Target, Range("B3:M5000")) Is Nothing Then
Lost_And_Found.Show


End If

End Sub