Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I set a cell to percentage with 2 decimal places 1

Status
Not open for further replies.

domino1352

IS-IT--Management
Nov 20, 2002
40
AU
i.e 46.45% instead of 0.454234234

I have tried this
xlWbk.ActiveSheet.Cells(row!, 37).style.name = "Percent"

but get told that I am passing not enought variables
the stuff I have seen on the net inc this forum dont suggest any other variables


I am I writing this in lotusscript from a notes client

any assistaqnce would be appreciated

tks


 
You can try creating your own style using the NumberFormat property - I think it'll work in LotusScript as well:

Code:
 xlWbk.ActiveSheet.Cells(row!, 37).NumberFormat = "#,##0.00%"

I think in your code the use of the .Name property is wrong - I seem to remember that this was an error in the xl help file. If you want to stick to using styles, you might give this a go:
Code:
xlWbk.ActiveSheet.Cells(row!, 37).Style = "Percent"

HTH

Cheers
Nikki
 
thanks Nikki worked perfectly I decided to go with the number format to remove any style requirement from the destination client


thanks again...
:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top