Copying data to another worksheet gives "Type Mismatch" error
Change Rows to Row.
Sheets("ws2").Range("B" & Range("B65536").End(xlUp).Row + 1).Value = vHours
--
John Green - Excel MVP
Sydney
Australia
"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!!!
|