Troublesome tester- Is clicking top left select all...how to codetrap this?

  • Thread starter Thread starter Ggalla1779
  • Start date Start date
G

Ggalla1779

Hi all

How do I trap or stop user from clicking top left ...ie all cells

As it causes error on worksheet and stops all macros/ code running

Error message Application-defined or object-defined error (1004)

regards

George
 
Ggalla1779 said:
How do I trap or stop user from clicking top left ...ie all cells

As it causes error on worksheet and stops all macros/ code running

Error message Application-defined or object-defined error (1004)

You're solving the wrong problem. Rather than prevent the users from
selecting everything, why not try to figure out what's causing the error in
the first place?
 
aha so grass hopper...DeNada is born

'Calling
If NamedRngIsDeNada("myRange") Then
Application.EnableEvents = True
Exit Sub
End If

Function NamedRngIsDeNada(sName As String) As Boolean
' Test for cleared Named Range
On Error Resume Next

NamedRngIsDeNada = Range(sName).Count <> 0
NamedRngIsDeNada = Not NamedRngIsDeNada
Err.Clear
End Function
 
Back
Top