Article View: free.it.visual-basic
Article #1891Re: Visual Basic e Excel
From: Cerberus1981
Date: Sun, 18 Jan 2004 21:16
Date: Sun, 18 Jan 2004 21:16
60 lines
2788 bytes
2788 bytes
non so se ci riuscir� a schiarirti le idee, per� prova questa sub
fammi sapere.
cerberus1981@hotmail.com
Private sub ChiamalaComeVuoiTu()
dim X as integer
dim Numeri(1 to 7) as integer
dim Lettere(1 to 7) as string
dim Compres(1 to 7) as new Collection
dim Medie(1 to 4) as single
numeri(1)=0'dai il valore collegato alla cella
numeri(2)=0'dai il valore collegato alla cella
numeri(3)=0'dai il valore collegato alla cella
numeri(4)=0'dai il valore collegato alla cella
Lettere(1)=""'dai il valore collegato alla cella
Lettere(2)=""'dai il valore collegato alla cella
Lettere(3)=""'dai il valore collegato alla cella
Lettere(4)=""'dai il valore collegato alla cella
for x=1 to 7 step 1
select case Lettere(x)
case="a"
compres(1).add numeri
case="b"
compres(1).add numeri
case="c"
compres(1).add numeri
case="d"
compres(1).add numeri
end select
next x
for X=1 to compres(1).count
media(1)=compres(1).item (x)
next x
media(1)=media(1)/compres(1).count
for X=1 to compres(2).count
media(2)=compres(2).item (x)
next x
media(2)=media(2)/compres(2).count
for X=1 to compres(3).count
media(3)=compres(3).item (x)
next x
media(3)=media(3)/compres(3).count
for X=1 to compres(4).count
media(4)=compres(4).item (x)
next x
media(4)=media(4)/compres(4).count
for x=1 to 4 step 1
msgbox "La media di " & asc(65+x) & " �:" Media(x)
next x
End Sub
***************************************************************
La Classe non � Acqua.
infatti � il modello in base al quale vengono create le istanze di un
oggetto in fase di esecuzione. Definisce le propriet� dell'oggetto e i
metodi utilizzati per gestire le funzioni dell'oggetto stesso.
***************************************************************
Technical Details
Message-ID:
<MICOb.140247$_P.5136585@news4.tin.it>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!irazu.switch.ch!switch.ch!newsfeed.nextoneserver.com!news-out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mailReferences:
<QJjOb.106149$VW.4322942@news3.tin.it>Show Full Headers
Complete Article Headers
X-Google-Language: ITALIAN,ASCII X-Google-Thread: f94ee,acaea2db111c412b X-Google-Attributes: gidf94ee,public X-Google-ArrivalTime: 2004-01-18 13:16:29 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!irazu.switch.ch!switch.ch!newsfeed.nextoneserver.com!news-out.tin.it!news-in.tin.it!news4.tin.it.POSTED!not-for-mail From: "Cerberus1981" <cerberus1981@tin.it> Newsgroups: free.it.visual-basic References: <QJjOb.106149$VW.4322942@news3.tin.it> Subject: Re: Visual Basic e Excel Lines: 62 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Message-ID: <MICOb.140247$_P.5136585@news4.tin.it> Date: Sun, 18 Jan 2004 21:16:28 GMT NNTP-Posting-Host: 80.117.224.103 X-Complaints-To: newsmaster@tin.it X-Trace: news4.tin.it 1074460588 80.117.224.103 (Sun, 18 Jan 2004 22:16:28 MET) NNTP-Posting-Date: Sun, 18 Jan 2004 22:16:28 MET Organization: TIN