Need Text box value to be $5,000.00 not 5000

  • Thread starter Thread starter Jason V
  • Start date Start date
J

Jason V

I have the following code
Sub CalcPrice()

Dim TotalPrice As Currency
Set xls = Excel.Worksheets("ProjectDB")
Sheets("ProjectDB").Select

Col = 11
For row = 141 To 160
Price = xls.Cells(row, Col)
TotalPrice = TotalPrice + Price
Next row
QuoteForm.TBPricing.Value = TotalPrice
End Sub
I want the sum of these cell displayed as currency and not just a number
Please help. Thank You
 
I have the following code
Sub CalcPrice()

Dim TotalPrice As Currency
Set xls = Excel.Worksheets("ProjectDB")
Sheets("ProjectDB").Select

Col = 11
For row = 141 To 160
    Price = xls.Cells(row, Col)
    TotalPrice = TotalPrice + Price
Next row
QuoteForm.TBPricing.Value = TotalPrice
End Sub
I want the sum of these cell displayed as currency and not just a number
Please help. Thank You

Hi Jason

QuoteForm.TBPricing.Value = FormatCurrency(TotalPrice)

Regards,

Per
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top