Wrox Home  
Search P2P Archive for: Go

  Return to Index  

access thread: Checking Excel values from Access 97


Message #1 by "Tim Maher" <tim.maher@s...> on Wed, 22 Jan 2003 11:15:30 +0000
Hi,

I have the following piece of code that checks each cell in a
spreadsheet to see if it is a date (displayed as dd/mm/yy hh:mm:ss)

 For Each rng In MyRange
   cell_value = rng.Value
   If Mid(cell_value, 3, 1) = "/" Then
      temp_cell_value = Left(cell_value, 8)
      rng.Value = temp_cell_value
      rng.Interior.ColorIndex = 3
   End If
 Next

My problem is that not all of the dates are changed some change to
dd/mm/yy (which is what I need) but some stay as dd/mm/yy hh:mm:ss.  As
a check I changed the cell colour to red to show that all the date type
cells have been accessed.


SO... all the date cells are changed to red..BUT only some of the dates
are changed to the correct format dd/mm/yy

Any ideas Why

Thanks

  Return to Index