Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date problems
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date problems
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 -- Regards, Tom Ogilvy "John" wrote in message ... 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date problems
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. Tom Ogilvy wrote: 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 -- R-e-t-u-r-n A-d-d-r-e-s-s I-n-s-t-r-u-c-t-i-o-n-s Change LID to |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date problems
Sorry, guess you didn't want an answer.
-- Regards, Tom Ogilvy "John" wrote in message ... 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. Tom Ogilvy wrote: 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 -- R-e-t-u-r-n A-d-d-r-e-s-s I-n-s-t-r-u-c-t-i-o-n-s Change LID to |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date problems | Setting up and Configuration of Excel | |||
date problems | Excel Discussion (Misc queries) | |||
Date problems, is it a bug??? | Excel Discussion (Misc queries) | |||
Date problems | Excel Worksheet Functions | |||
Date Problems | Charts and Charting in Excel |