code works in excel 2002, but not in excel 2003

  • Thread starter Thread starter pyc
  • Start date Start date
P

pyc

Cells(j, 1) = DateValue(Cells(j, 1)) + TimeValue(Cells(j, 1))

this is the line, and the error message is "type mismatch" ... sam
code works in excel 2002, but not in 2003.

The date is in format: 01-Dec-02 10:18:59 AM


please help.... it must be a classic problem..
 
Works for me in both XL03 and XL04.

Are you sure the cell contains what you posted?
 
I get a type mismatch error in Excel 2003 and 2002 only if the cell entry
cannot be interpreted as a date/time. It may be that your Windows regional
setting for date format is different than the format in the cell. Why it
would work in one version of Excel and not another is a mystery to me.

--
Jim Rech
Excel MVP
| Cells(j, 1) = DateValue(Cells(j, 1)) + TimeValue(Cells(j, 1))
|
| this is the line, and the error message is "type mismatch" ... same
| code works in excel 2002, but not in 2003.
|
| The date is in format: 01-Dec-02 10:18:59 AM
|
|
| please help.... it must be a classic problem...
|
|
| ---
| Message posted
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top