|
Question : how to format 3 decimal places in spreadsheet control cells
|
|
I'm using MS Office 2000 Excel. I'm using the Spreadsheet control, pasted onto a form.
I'm trying to format the Spreadsheet control cells so they show 3 decimal place numbers but I'm not succeeding. For example, the number 2.745 shows as 2.75 (rounded off to the higher hundredth). In fact, all numbers show formatted as 2 decimal places.
How do I control the control's formatting of numbers programmatically?
Thanks in advance.
Dave
|
|
Answer : how to format 3 decimal places in spreadsheet control cells
|
|
Hi Dave,
> How do I control the control's formatting of numbers programmatically?
You need to reference the sheet within the Spreadsheet Control to set the range format like this:
Spreadsheet1.Worksheets(1).Range("A2:G250").NumberFormat = "0.000"
or this:
Spreadsheet1.Worksheets("Sheet2").Range("A2:G250").NumberFormat = "0.000"
Jim
|
|
|