Results 1 to 2 of 2

Thread: ....Beginners problem (VB5)

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2001
    Posts
    23

    ....Beginners problem (VB5)

    I have an 'IF THEN ELSE' loop. But I would like to have another IF THEN loop inside this (just one simple if then). Is this possible? Or should I be looking at something different altogether?

    Thanks folks, your help is invaluable.
    Much appreciated.

  2. #2
    Addicted Member Geoff Gunson's Avatar
    Join Date
    Jun 1999
    Posts
    241
    Yes its called nested statements.

    IE

    Code:
    If x = 1 Then
        If x = 1 And y = 1 Then
            code
        End If
    Else
        code
    End If
    or there is a select statemate

    Code:
    Select Case x
        Case 1
            code
        Case 4
            code
        Case 5
            code
        Case 6
            code
    End Select
    HTH

    G

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