Results 1 to 6 of 6

Thread: need a specific IF Then example...

  1. #1

    Thread Starter
    Addicted Member dhighlander's Avatar
    Join Date
    Aug 2001
    Location
    Houston
    Posts
    171

    need a specific IF Then example...

    I am trying to find an example of an If Then statement for the value of a picture box.

    My statement does not work. Maybe you can just see what I am doing wrong.

    Code:
    Private Sub mnuFileConvert_Click()
       If (imgFile.Picture.Value = "") Then
          Exit Sub
       Else
        .........my code goes here
       End If
    End Sub

  2. #2
    You want to tell if there is a picture loaded in the picturebox?

  3. #3
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Denver
    Posts
    265
    Pictureboxes don't have a .picture.value property.

  4. #4

    Thread Starter
    Addicted Member dhighlander's Avatar
    Join Date
    Aug 2001
    Location
    Houston
    Posts
    171
    Yes I just want to know if my picture box called "imgFile" has a value in it or not.

  5. #5
    Tygur
    Guest
    VB Code:
    1. If imgFile.Picture.Type = vbPicTypeNone Then
    2.     'Picturebox is empty
    3. Else
    4.     'Picturebox has something in it
    5. End If

  6. #6

    Thread Starter
    Addicted Member dhighlander's Avatar
    Join Date
    Aug 2001
    Location
    Houston
    Posts
    171
    thank you

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