error 13

  • Thread starter Thread starter PeCoNe
  • Start date Start date
P

PeCoNe

Hallo,
I am getting error 13 during execute on Case "G9":

Private Sub Worksheet_Change(ByVal Target As Range)
'Do nothing if more than one cell is changed or content deleted

If Not Intersect(Target, Range("G5,G9")) Is Nothing Then
Exit Sub
End If

Select Case Target
Case "G9"
etc.

Why?
 
Hi,

Am Wed, 26 Dec 2012 14:43:00 +0100 schrieb PeCoNe:
Select Case Target
Case "G9"

try:

Private Sub Worksheet_Change(ByVal Target As Range)

If Intersect(Target, Range("G5,G9")) Is Nothing _
Or Target.Count > 1 Then Exit Sub

Select Case Target.Address(0, 0)
Case Is = "G9"
..........

Regards
Claus Busch
 
PeCoNe wrote, on 26th dec. 2012 14:43 UTC + 1 :
Hallo,
I am getting error 13 during execute on Case "G9":

Private Sub Worksheet_Change(ByVal Target As Range)
'Do nothing if more than one cell is changed or content deleted

If Not Intersect(Target, Range("G5,G9")) Is Nothing Then
Exit Sub
End If

Select Case Target
Case "G9"
etc.

Why?


Hello,

Error 13 is "type mismatch error".
That label appeared at a time when Excel was sold with a robust help system.

It can be interesting to try a Select Case Target.Text
but it seems Claus's advices are more concrete.
 
Back
Top