LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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!!!


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
when copying from one spreadsheet to another I get "#VALUE!" error,how can I eliminate it? Joe Excel Discussion (Misc queries) 3 March 21st 08 09:53 PM
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
multiple file uploading - runtime error'13': type mismatch "While Counter <= UBound(FName)" Sinner Excel Discussion (Misc queries) 3 March 1st 07 09:44 AM
VBA setting formula for a cell causes "Wrong data type" error undercups Excel Discussion (Misc queries) 4 September 17th 06 10:14 PM
Where is the toolbar with the "bold type", "font type", options fwccbcc New Users to Excel 2 May 3rd 06 09:11 PM


All times are GMT +1. The time now is 03:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"