Takker mange gang
mvh Henrik C
"John Doe" <john@doe.com> skrev i en meddelelse
news:arj221$blq$1@news.net.uni-c.dk...
> Jada.
>
> Her er 2 eksempler:
>
> 1.
>
> 'eksempel med private variabel
> Private m_iCount As Integer
>
> Private Sub Command1_Click()
> m_iCount = m_iCount + 1
> MsgBox m_iCount
> End Sub
>
>
> 2.
>
> 'Eksempel med static-variabel
>
> Private Sub Command1_Click()
> Static iCount As Integer
> iCount = iCount + 1
> MsgBox iCount
> End Sub
>
>
> "Henrik Cichosz" <cichosz@tdcadsl.dk> wrote in message
> news:3ddd0839$0$242$edfadb0f@dread14.news.tele.dk...
> > hej og tak for svar. kan man lave sådan at der kun bruges en command og
> den
> > stadig tæller klikkene og skriver dem ud med msgbox
> > mvh Henrik Cichosz
> > "John Doe" <john@doe.com> skrev i en meddelelse
> > news:ariqff$uk8$1@news.net.uni-c.dk...
> > > 1. opret nyt projekt
> > > 2. tilføj 2 "commnd-buttons" - med navnene command1 og command2
> > >
> > > Command1 fortæller hvor mange gange der er klikket på Command2
> > >
> > > ----------------------------------------------------
> > > Option Explicit
> > >
> > > Private m_ClickCount As Long
> > >
> > > Private Sub Command1_Click()
> > > MsgBox m_ClickCount
> > > End Sub
> > >
> > > Private Sub Command2_Click()
> > > m_ClickCount = m_ClickCount + 1
> > > End Sub
> > > ----------------------------------------------------
> >
> >
> >
> > ---
> > Outgoing mail is certified Virus Free.
> > Checked by AVG anti-virus system (
http://www.grisoft.com).
> > Version: 6.0.422 / Virus Database: 237 - Release Date: 20-11-2002
> >
> >
>
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
http://www.grisoft.com).
Version: 6.0.422 / Virus Database: 237 - Release Date: 20-11-2002