View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Basil Basil is offline
external usenet poster
 
Posts: 60
Default datepicker on 1904 date spreadsheet

Thanks Dave,

I actually tried that and it was subtracting 8 years instead of 4! At that
point I realised that I needed to add '.Value' after my object name to make
the spreadsheet undertsand the correct date. A bit of a weird one, but sorted
now.

Thanks for looking into it mate.

Basil

"Dave Peterson" wrote:

Maybe just subtract 1462 before you assign the value to the cell?

Basil wrote:

Hiya,

I am using a datetime picker from a userform and on change I populate a cell
on a spreadsheet which is using the 1904 date system (this is because it
needs to be able to view negative times).

The problem is that when the date is transferred from the date picker to the
spreadsheet, it is 4 years and 1 day forward of what it should be. Is there a
way of changing the date picker / VB times so that they are in the 1904
system?

Thanks,

Basil


--

Dave Peterson