Article View: free.it.visual-basic
Article #1125Aiutino per favore
From: WebMasterPro
Date: Mon, 18 Oct 2004 07:56
Date: Mon, 18 Oct 2004 07:56
33 lines
2175 bytes
2175 bytes
Salve a tutti,
vi dico subito che ho un problemino in visual basic 6. Perdonate se le mie
perplessit� sono banali, ma ancora devo imparare molto.
Ho scritto queste poche righe di codice per fare quantit� prodotto per
prezzo (3 righe) e poi i totali:
Dim var1 As Double
var1 = Val(Text1.Text) * Val(Text2.Text)
Label1.Caption = var1
Dim var2 As Double
var2 = Val(Text3.Text) * Val(Text4.Text)
Label2.Caption = var2
Dim var3 As Double
var3 = Val(Text5.Text) * Val(Text6.Text)
Label3.Caption = var3
Label4.caption = Val(Label1.Caption) + Val(Label2.Caption) +
Val(Label3.Caption)
Non capisco come mail in Label4.Caption non mi spuntano i decimali.
Negli altri label con le cifre in euro ci sono i decimali, ma nel label4 che
� una semplice somma, spunta solo il numero intero. Come mai?
Spero qualcuno mi aiuti a risolvere questo problema.
E poi se non chiedo troppo come faccio a fare spuntare solo 2 cifre dopo la
virgola? Per i centsimi?
Certe volte mi spuntano cifre anche con 4 cifre decimali.
Questi 2 problemini mi stanno scoraggiando, spero mi aiutate
Grazie in anticipo a tutti coloro mi daranno una mano
Ciao e buona programmazione
Technical Details
Message-ID:
<5HKcd.46310$H11.1620580@twister1.libero.it>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: f94ee,bcfeea5931d06bee,start X-Google-Attributes: gidf94ee,public X-Google-Language: ITALIAN,ASCII Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!news.mailgate.org!nntp.infostrada.it!twister1.libero.it.POSTED!not-for-mail From: "WebMasterPro" <nospam@nospam.it> Newsgroups: free.it.visual-basic Subject: Aiutino per favore Lines: 35 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-RFC2646: Format=Flowed; Original Message-ID: <5HKcd.46310$H11.1620580@twister1.libero.it> Date: Mon, 18 Oct 2004 07:56:49 GMT NNTP-Posting-Host: 62.98.160.236 X-Complaints-To: abuse@inwind.it X-Trace: twister1.libero.it 1098086209 62.98.160.236 (Mon, 18 Oct 2004 09:56:49 MET DST) NNTP-Posting-Date: Mon, 18 Oct 2004 09:56:49 MET DST Organization: [Infostrada]