View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default macro to change number format of a highlighted range in Excel 2007

Is the worksheet protected?



Lauren977 wrote:

I was using the following macro to change the number format of a highlighted
range.

Selection.NumberFormat = "#,##0"

In Excel 97 and 2000 it was working fine. In Excel 2007 it is giving me the
following error message:

Run-time error '1004'
Unable to set the NumberProperty of the range class

I am stumped and haven't been able to find any documentation on this change.


--

Dave Peterson