View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
LarryP[_2_] LarryP[_2_] is offline
external usenet poster
 
Posts: 17
Default Help! - Formatting Oddity

Annoying, I bet. Why not go with the flow and just add a
couple lines at the end of your procedure to select that
column and format it the way you want it?
-----Original Message-----
I've tried everything I can think of to resolve this

problem and suspect it may some obvious rule that I'm
overlooking. I have a workbook with several worksheets
that contain VBA procedures that make updates from our
Help Desk SQL Server database. Some of these worksheets
are updated every minute from a clock procedure.

Several of these worksheets are for reporting purposes

and are updated only by running a procedure from a command
button. Here's my problem:

On one of these worksheets there is a column that is

populated from the SQL database and I have formatted the
column cells to be in the Number format. When the Clock
procedure is fired, several of these cells in the middle
of the column change to a Date format! There are cells
above and below that remain in the Number format, it's
just these few cells in the middle that change to Date
format. Keep in mind that these cells (and worksheets) are
not being updated when the Clock procedure fires, only the
worksheets with procedures called by the Clock procedure.

I have tried changing the format of the cells back to

Number and saving the file and it works - until the Clock
procedure fires again. Then these cells in the middle of
the column change back to Date format. I can't see
anything in my code that would cause this to happen and if
there was (such as an implicit conversion), wouldn't it
change the whole column?

I've tried to copy the cells from above into the Date

format cells, I've tried clearing everything with the Edit
command, I've tried formatting the cells in code before
the SQL update is run (but that would happen only if the
Report command button was clicked). All to no avail. It
changes only until the Clock procedure fires and I'm right
back to square one.

Can anyone offer something that I may be overlooking?

This thing is driving me crazy!
.