View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Rounding problem (controlling word from excel)

I suspect you have Fee_deducted declared as long or integer. So it is being
rounded upon assignment. Declare it as single or double (or currency).

the format function isn't the problem:

fee_deducted = 1864.96
? Format(Fee_deducted, "$##.##0")
$1864.960


--
Regards,
Tom Ogilvy

"robert burger" wrote in message
...
Good morning,

having a problem with rounding errors when using Walkenbach Sub
MakeMemos()
how do i stop word from rounding the number from excel?
for example:
TypeText Text:="Fee to be Deducted from Account:" & vbTab & vbTab &
vbTab & vbTab & vbTab & vbTab & vbTab & Format(Fee_deducted, "$##.##0")

number shows as 1865.000 when it should be 1864.96

Thanks,
For your help
RTB


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!