View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
TB[_3_] TB[_3_] is offline
external usenet poster
 
Posts: 10
Default Copying data to another worksheet gives "Type Mismatch" error

I am trying to copy data from one worksheet to another, but I keep getting a
"Type Mismatch" (error 13) message. I've tried a bunch of different ways to
code this, but I end up with the same error every time. In desperation, the
following was the last attempt:

Dim vHours as Integer
Dim vdate as Date

If Range("C10").Value 0 Then
vHours = Range("C10").Value
vDate = Range("G5").Value - 6
Sheets("ws2").Range("B" & Range("B65536").End(xlUp).Rows + 1).Value =
vHours
Sheets("ws2").Range("A" & Range("A65536").End(xlUp).Rows + 1).Value =
vDate
End If

What am I missing? This is driving me crazy. HELP!!!