View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default .NumberFormat not getting applied?

Any chance that you're looking at the wrong column??? You didn't show what that
..columns(...) referred to.

And two wild guesses...

Do you have merged cells in that range?
What's the style for that range? Is it something special or is it Normal?

Does the code work on a brand new worksheet?

PeteCresswell wrote:

---------------------------------------------------------------------------------
Const mFormat_DollarAmount As String = "#,##0.00"

4140 With .Columns(mColNum_FP_AmountOutstanding)
4141 .ColumnWidth = 15
4142 .NumberFormat = mFormat_DollarAmount
4143 .HorizontalAlignment = xlRight
4149 End With
---------------------------------------------------------------------------------

The width and horizontal alignments are working, but
the .NumberFormat is not.

Same problem with date columns:
---------------------------------------------
Const mFormat_Date="mm/dd/yyyy"
.NumberFormat = mFormat_Date
--------------------------------------------

Some limitation on what I can do at the column level?


--

Dave Peterson