View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nigel Nigel is offline
external usenet poster
 
Posts: 923
Default Fixed Decimal in Text Box


Hi Donald,
Try this .....

txtGain.Value =
format(Workbooks("MyWorkSheet.xls").Sheets("MyHist ory").Range("J18").Value,"
$0.00")

--
Cheers
Nigel



"Donald" wrote in message
...
The following code displays a cell value in my text box(txtGain), how do I
limit the text display to 2 decimals when the value in "J18" contains more
than two decimals?

txtGain.Value = "$" &
Workbooks("MyWorkSheet.xls").Sheets("MyHistory").R ange("J18").Value

--
DS