1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Visual Basic Fun

Discussion in 'Software Development' started by JWasibpi, Aug 5, 2002.

Thread Status:
Not open for further replies.
  1. JWasibpi

    JWasibpi Thread Starter

    Joined:
    Mar 27, 2002
    Messages:
    34
    I need to pass an array of values to a select statement in VB6 but need help with the syntax

    cmnFileGet.CancelError = True
    cmnFileGet.FileName = txtFilePath.Text
    cmnFileGet.Filter = "*.txtDate"

    cmnFileGet.FileName = txtFilePath.Text

    is the line of code that is currently passing a single file to the select statement. I want all files that qualify for the filter "*.txtDate"

    txtDate is a text box the end user fills in. For example I want all files that qualify for "*.7/30" if the end user has entered 7/30 into the text box.

    The syntax in the case statement must somehow cause the program to go back for the next value in the array once all the other code in the case statement is executed.

    Any help will be greatfully appreciated.
     
  2. Darith755

    Darith755

    Joined:
    Aug 28, 2002
    Messages:
    5
    If I understand your question, you would want to do something like this:

    cmnFileGet.Filter = "*." & txtDate.Text

    That would limit the dialog box to files with an extention "7/09" in your example. Again, I'm not sure I understand the question. I appologize if I'm way off here, but let me know if I am...

    As far as the array part of the question goes, if your array was called Dates() where each member of Dates() was a date entered by the user:

    for x = 1 to UBound(Dates)
    Select Case Dates(x)
    case "7/09"
    ...
    case "7/10"
    ...
    case else
    ...
    End Select
    Next x
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/90092

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice