Results 1 to 3 of 3

Thread: [RESOLVED] Help with select code

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    Resolved [RESOLVED] Help with select code

    I am developing a prog to keep track of all my movies stored in various folders, external drives and dvd's

    I have manged to include code to extract the information from the movie like resolution, aspect ratio and other info.

    I have now added cmd button to play the movie from the program in Media Player and GOM Player based on the folder and movie name stored in a text box. D:\Movies\Thrillers\Edge of Darkness.avi

    I now need to specify not to open the player when the text field is empty or not like a valid directory.

    for instance if the text box = "" or not like :\
    D:\Movies\Thrillers|Edge of Darkness.avi

    I have tried

    HTML Code:
    If Location.Text = "" Or Location.Text not like "%:\%") Then
        msgbox "No location allocated to this Movie" _
                & vbCrLf & vbCrLf & "Please allocate correct location."
        Exit Sub
    End If

    With the not like "%:\%" I want the message to appear if :\ is not part of the text in the text box. I have tried various way without success.

    Will appreciate if someone with more experience can help me out.
    Last edited by RayComp; Jul 11th, 2010 at 07:30 AM.

  2. #2
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Help with select code

    Code:
    If Len(Location.Text) = 0 Or (InStr(Location.Text, ":\") = 0) Then

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2005
    Posts
    43

    Re: Help with select code

    Thanks a ton. Nice to learn something new.

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