Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.tables
|
|||
|
|||
Table calculation problem
I have a form inside a table that gives a double sum after calculating
totals after I put some VBA in. I VBAed subtotals at the top of the doc and loaded them into form fields base1, base2, base3 via if Premium1 200 then Premium1 = 200 endif ActiveDocument.FormFields("Base1").Result = Premium1 and the same for Base2 and Base3 I then do a Type calculation = Base1+Base2+Base3 and put it into TotalBase I do they same for Surg1, Surg2, Surg3 and put that into TotSurg These are OK with the correct totals but I do a calculation =TotBase+TotSurg and it puts a double number into TotAnnPrem ie: TotalBase=2640 TotSurg=0 TotAnnPrem=26402640 It worked OK before the VBA but I don't reference the TotAnnPrem anywhere in the code and it sets all the Base totals correctly. Any ideas where to look? Thanks....... |
#2
Posted to microsoft.public.word.tables
|
|||
|
|||
Table calculation problem
You will always get this error with a calculation for which the inputs are
themselves the results of another calculation. You will have to use TotAnnPrem = Base1+Base2+Base3+Surg1+Surg2+Surg3 -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "bob engler" wrote in message ... I have a form inside a table that gives a double sum after calculating totals after I put some VBA in. I VBAed subtotals at the top of the doc and loaded them into form fields base1, base2, base3 via if Premium1 200 then Premium1 = 200 endif ActiveDocument.FormFields("Base1").Result = Premium1 and the same for Base2 and Base3 I then do a Type calculation = Base1+Base2+Base3 and put it into TotalBase I do they same for Surg1, Surg2, Surg3 and put that into TotSurg These are OK with the correct totals but I do a calculation =TotBase+TotSurg and it puts a double number into TotAnnPrem ie: TotalBase=2640 TotSurg=0 TotAnnPrem=26402640 It worked OK before the VBA but I don't reference the TotAnnPrem anywhere in the code and it sets all the Base totals correctly. Any ideas where to look? Thanks....... |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Track changes in word table problem | Tables | |||
More Info On Directory Merge Please | Mailmerge | |||
Problem with text in table cell | Microsoft Word Help | |||
Table Problem | New Users | |||
Row height problem with table in table | Tables |