Hi there,

I'm trying to format a number in excel with :

Range("A1").NumberFormat = "0.00"

In excel, I obtain a personalised format "0\.00" witch is ok for 2 decimals, but that divide by 100! Anyone has a clue why


Re: Visual Studio Tools for Office Bug with Range.NumberFormat = "0.00"

Cindy Meister

1. Which version of Office are we dealing with

2: What are you Windows regional settings More specifically, what are the settings for thousands and decimal separators

3. Are you absolutely sure this is performing a division The backslash in older Office applications often indicate the following character in a string should be interpreted literally.

Re: Visual Studio Tools for Office Bug with Range.NumberFormat = "0.00"


1. I'm working with Office 2003. I'm using Microsoft Office 11.0 Object library and Microsoft Excel 11.0 Object library.

2. My regional settings are "Francais (Canada)" with spaces (" ") for thousand separator and dot (".") for decimals separator.

3. It is not performing a division on the data, but only on the format. Ex : the value in the cell is 123.456, the displayed number is : 1.23.

Actually, the proble is this one :

1. I create a .xls file using Visual Basic

2. I specify .NumberFormat = "0.00" on a range

3. When I open the file with Excel, the format of the cell corresponding to the range is costum with 0\.00

Thanks a lot for your help!

Re: Visual Studio Tools for Office Bug with Range.NumberFormat = "0.00"

Ji Zhou C MSFT

Hi Mat,

Have you resolved the problem I followed all the steps from you. Set my region to French(Canada) with thousands symbol as ( ) and decimal symbol as (.). And then set A1s NumberFormat to 0.00. After that, I open the excel file, but both the value and format appear right. So, if convenience, could you please find another environment to have a test

Does other similar NumberFormat string works well, like 0.000, # ##0.00 If yes, is # ##0.00 competent for a workaround in your scenario