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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Decimal PLacement

Status
Not open for further replies.

hoja

Technical User
Dec 3, 2003
102
US
Can anyone help me with the line of code that I would need to show only 2 decimal placements on my square footage result. This is my code. When it prints my sq ft result on my drawing, it shows the number with like 1 decimal placements (29.888888888888)

Dim insPointSqFt(0 To 2) As Double
Dim textHeightSqFt As Double

insPointSqFt(0) = 543
insPointSqFt(1) = 193
insPointSqFt(2) = 0
textHeightSqFt = 3

Dim SqFt As Integer
SqFt = 144

txtSqFt1.text = (txtSplash1Width.text * txtSplash1Length.text / SqFt)

Set textObj = ThisDrawing.ModelSpace.AddText(txtSqFt1.text, insPointSqFt, textHeightSqFt)


Thank you
 
Hi hoja,

Something like:

Code:
txtSqFt1.text  = Format(txtSplash1Width.text * txtSplash1Length.text / SqFt, "##.##")

HTH
Todd
 
thank you, this works.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top