Thread: Userform
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_4_] Bob Phillips[_4_] is offline
external usenet poster
 
Posts: 834
Default Userform

Try

If Not Intersect(Target, Range("emp_All")) Is Nothing Then
On Error Resume Next
If Range("A" & Target.Row) < "" Then
UserForm1.Show
End If
On Error GoTo 0
Else
On Error Resume Next
Unload UserForm1
Err.Clear
End If

HTH

Bob


"LaDdIe" wrote in message
...
Hi,

I have this code that I can't quite get right

If Not Intersect(Target, Range("emp_All")) Is Nothing Then
On Error Resume Next
If Range("A(ActiveCell.Row)") < "" Then
UserForm1.Show
End If
On Error GoTo 0
Else
On Error Resume Next
Unload UserForm1
Err.Clear
End If

It works except that it appears to ignore 'If Range("A(ActiveCell.Row)")
<
"" ' and proceeds to show the UserForm even if range is empty.