error 13

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?
 
C

Claus Busch

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
 
G

Gloops

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top