Results 1 to 5 of 5

Thread: This is getting serious people! #2

  1. #1
    Guest
    Take a look at this thread!

    It's really getting serious, and it's not just Yonatan ! My name is spelled Matthew Gates. Two t's! Not one!

    Code:
    'Author: Yonatan
    Origin: http://forums.vb-world.net/showthrea...threadid=28673
    'Purpose: Get's Matthew's name right 
    'Version: VB4+ 
    
    Private Sub cmdName_Click()
    
      Dim ShutUp As Boolean, MyName As String
        
        MyName = StrConv(InputBox("What's Matthew's name???"), vbProperCase)
    
        If Not Len(MyName) = 7 Then
            Call MsgBox("That's not Matthew's name!", vbCritical)
            Exit Sub
        End If
        
        ' I could have written: If Not MyName = "Matthew" Then ShutUp = True
        ' But I didn't! Instead, I used Left, Mid and Right, and even indented it so it can be read top to bottom.
    
          If Not Left(MyName, 1) = "M" Then ShutUp = True '
        If Not Mid(MyName, 2, 1) = "a" Then ShutUp = True '
        If Not Mid(MyName, 3, 1) = "t" Then ShutUp = True '
        If Not Mid(MyName, 4, 1) = "t" Then ShutUp = True '
        If Not Mid(MyName, 5, 1) = "h" Then ShutUp = True '
        If Not Mid(MyName, 6, 1) = "e" Then ShutUp = True '
         If Not Right(MyName, 1) = "w" Then ShutUp = True '
        
        If ShutUp Then
            Call MsgBox("That's not Matthew's name!", vbCritical)
        Else
            Call MsgBox("WOO! WOO! You finally got Matthew's name right! You actually typed Matthew!", vbExclamation, "Hallejuia!")
        End If
    
    End Sub

    [Edited by Matthew Gates on 09-29-2000 at 02:15 PM]

  2. #2
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    WOO! Leet copy & paste skills!
    Originally copied and pasted by Matthew Gates
    Code:
    ' Because the 1st letter is: Y
    ' Because the 2nd letter is: o
    ' Because the 3rd letter is: n
    ' Because the 4th letter is: a
    ' Because the 5th letter is: t
    ' Because the 6th letter is: a
    ' Because the 7th letter is: n
    You'll get over it.

  3. #3
    Guest
    Where do you see that? And you are the author. The code looks advanced, even though something simple would do the trick.

    And yes, copy and paste are wonderful things .

  4. #4
    Guru Yonatan's Avatar
    Join Date
    Apr 1999
    Location
    Israel
    Posts
    892
    Where do you see that?
    [Edited by Matthew Gates on 09-29-2000 at 02:15 PM]
    Riiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiight.
    I saw it before 09-29-2000 at 02:15 PM.
    And, there are still empty comments in the place where mine were. You forgot to remove the little ' marks.
    Now you're probably going to edit it again.

  5. #5
    Guest
    Nah, I don't need to edit, the ' comments won't hurt . And plus, you already know ;-x.

    So remember, always spell Matthew with two t's!
    And if everyone starts spelling it correctly,
    I can die happy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width