View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
donwb donwb is offline
external usenet poster
 
Posts: 81
Default DoubleClick mystery

Win XP Excel 2003

I have exported an Outlook calendar to an Excel file.
In the "StartDate" column of the resulting file,
I would like all dates to have the same format of dd/mm/yyyy.
Some do and if I click Format/Cells, the 'dates' format is confirmed.

However some dates seem to have an indeterminate format.
For example, some appear as 2/2/2007 or 12/3/2008.
If I click Format/Cells, the format says General.
If I then select Dates and the format I require, there is no change to the
cell.

If I manually double click the date cell or press function key F2,
and then select another cell,
this results in the cell showing the date in the form dd/mm/yyyy, as I
require.

I have tried to automate this DoubleClick procedure in VBA:-

Sub Macro1()
For Each c In Range("B1:B2777 ")
c.Select
Application.DoubleClick
Next c
End Sub

But this does'nt work.
Neither does Application.SendKeys("F2")

What am I missing here?
donwb