View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Type mismatch error'13'

The code you have posted is fine. This works for me... (I don't have CopyStuff)

Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Select Case sh.Name
Case "Data", "Motorcycle", "Indian", "Native"
'1=data 6=Motorcycle 7=Indian 8=Native nbrs
If target.Column = 10 And target.Value 10 Then
MsgBox sh.Name & " " & target.Value
End If
End Select
End Sub

I suspect that you have declared CopyStuff incorrectly. It should be
something like

Public Sub CopyStuff (byval sh as Worksheet, byval target as Range)
--
HTH...

Jim Thomlinson


"Curt" wrote:

anyone see why this creats this error
Thanking you in advance

If target.Column = 10 And target.Value 10 Then

Private Sub Workbook_SheetChange(ByVal sh As Object, ByVal target As Range)
Dim wksSummary As Worksheet
Dim rngPaste As Range
Select Case sh.Name
Case "Data", "Motorcycle", "Indian", "Native"
'1=data 6=Motorcycle 7=Indian 8=Native nbrs
If target.Column = 10 And target.Value 10 Then
Call CopyStuff(sh, target)
End If
End Select
End Sub