Date problems

  • Thread starter Thread starter John
  • Start date Start date
J

John

2003

I dim all the cells as Date 03/14/01
I dim the transferring variable as date
When I do variable = cell and then to the newcell = variable it doesn't
work. It looks like ######### until I try to format it and then it is
nonsense.

I want to pick a date out of one cell and put it into a cell on another
sheet. How do I do that so it looks right?

Thanks

John
 
Dim destCell as Range
set destcell = Worksheets("Sheet2").Range("B9")
with Worksheets("Sheet1").Range("F11")
destcell.value = .Value
destcell.Numberformat = .Numberformat
End With

or
Dim destCell as Range
set destcell = Worksheets("Sheet2").Range("B9")
Worksheets("Sheet1").Range("F11") _
.copy Destination:=destcell
 
I misspoke... I don't dim the cells I format the date columns in each
worksheet before running the macro. I only dim the variable used for
transferring. So I format all the cells in all the worksheets the same
(Date 03/14/01) and then dim a variable to Date. Using that variable to
pass dates from one sheet to another isn't working.

Thanks


The worksheets are pre formatted worksheets. I am filling them out by
referencing other sheets.

Each sheet is date and charges incurred. The master sheet collects these
for presentation.
 
turned out I was trying to pull the date from the wrong(empty) cell, sorry
John
 

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