What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » N00bish VB question

Pages: (2): « First « 1 [ 2 ] Last »
N00bish VB question
Author: Message:
dotNorma
Veteran Member
*****

Avatar

Posts: 1745
Reputation: 17
33 / Male / –
Joined: May 2003
RE: N00bish VB question
quote:
Originally posted by Anubis

case method? What's that?


Private Sub Command1_Click()
   Times = Times + 1
*The user clicked the button once more
         Case 1  (1st time the button is clicked)
                Label1.Caption="First Text"
         Case 2 '(2nd time the button is clicked)
                Label1.Caption="Second Text"
         Case 3 (3rd time the button is clicked)
                Label1.Caption="Third Text"
         Case Else
                 Label1.Caption="Here is where the text goes when all the other cases have been gone threw."
     End select
End sub

Its what Choli said. I cleaned it up a bit :-)

Edit :: You people beat me by a mile :-/

This post was edited on 06-04-2004 at 03:23 PM by dotNorma.
06-04-2004 03:22 PM
Profile PM Web Find Quote Report
Mike
Elite Member
*****

Avatar
Meet the Spam Family!

Posts: 2795
Reputation: 48
32 / Male / Flag
Joined: Mar 2003
RE: N00bish VB question
Does this help?

Also...
Where to ask your vb questions :
http://www.vbforums.com :spam: :P

.zip File Attachment: anubis project.zip (1.55 KB)
This file has been downloaded 151 time(s).

This post was edited on 06-04-2004 at 03:46 PM by Mike.
YouTube closed-captions ripper (also allows you to download videos!)
06-04-2004 03:44 PM
Profile E-Mail PM Web Find Quote Report
Choli
Elite Member
*****

Avatar
Choli

Posts: 4714
Reputation: 42
43 / Male / Flag
Joined: Jan 2003
RE: N00bish VB question
quote:
Originally posted by Anubis
It doesn't seem to be working...I had to change it slightly because my version of VB uses slightly different codes;
of course, you have to adjust it depending on the name of the button, label and form ;)
quote:
Originally posted by Mike2
Does this help?
of course, but doing "select case"s with strings is way slower than with a long ;)
Messenger Plus! en espaņol:
<< http://www.msgpluslive.es/ >>
<< http://foro.msgpluslive.es/ >>
:plus4:
06-04-2004 05:15 PM
Profile PM Find Quote Report
Millenium_edition
Veteran Member
*****

Avatar

Posts: 1787
Reputation: 57
Joined: Apr 2003
RE: N00bish VB question
ehm, why not use an array?

code:
Dim strMyString(20) As String

Private Sub Form_Load()
strMyString(1) = "..."
strMyString(2) = "..."
End Sub

Private Sub Command1_Click()
Static lngTimes As Long
lngTimes = lngTimes + 1
Label1.Caption = strMyString(lngTimes)
End Sub

06-04-2004 05:37 PM
Profile E-Mail PM Find Quote Report
Pages: (2): « First « 1 [ 2 ] Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On