home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 10,064 of 10,840   
   Steven Smith to Steven Smith   
   Re: Problem adding currency in VB6   
   15 May 06 19:05:42   
   
   XPost: microsoft.public.dotnet.languages.vb   
   From: sluke4@webbox.com   
      
   I should probably show you the code in question.....   
      
      
   Dim AmountDue As Currency   
       AmountDue = Item1Amt.Text + Item2Amt.Text + Item3Amt.Text +   
   Item4Amt.Text + Item5Amt.Text + Item6Amt.Text + Item7Amt.Text +   
   Item8Amt.Text - Item9Amt.Text - ItemAAmt.Text   
      
      
      
      
   Thanks again...   
      
      
   Steven Smith  wrote in   
   news:l74ag.25165$Gg.2267@twister.nyroc.rr.com:   
      
   > Hi,   
   >   
   > I'm trying to write a simple program to print invoices for people I do   
   > work for. I've got a form with textboxes for descriptions and amounts   
   > for items, and some code for printing the invoices. It all works   
   > except for the one line that adds all of the item amounts. At run   
   > time, a "type mismatch" error is thrown. I've tried a couple of   
   > different things, but the code won't work. Is there something special   
   > about adding currency I'm missing? I've also tried making everything a   
   > string, and when I add amounts, it will just concatenate the strings.   
   > Also, this method won't let me subtract discounts.   
   >   
   > Any help or code snippets would be greatly appreciated.   
   >   
   > Thanks,   
   >   
   >   
   > Steven Smith   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca