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

Thanks John. That stopped the errors, but then the code didn't do anything.
I'm confused??!!!

John Green wrote:
Change Rows to Row.

Sheets("ws2").Range("B" & Range("B65536").End(xlUp).Row + 1).Value =
vHours



"TB" wrote in message
...
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!!!