OpenFileDialog

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?=

    #1

    OpenFileDialog

    I would like to open an OpenFileDialog box with a certain prefix. For
    example all files beginning with AllState.

    How do you do that?

    Thanks...Arne
  • Michael M.

    #2
    Re: OpenFileDialog

    If I am understanding what you mean then this will work

    The bit before the pipe is the description that appears in the dialog box
    OpenFileDialog1 .Filter = "(State files) | allstate*"

    OpenFileDialog1 .ShowDialog()



    "Arne Beruldsen" <ArneBeruldsen@ discussions.mic rosoft.comwrote in message
    news:C195E1BD-5F13-4F46-AFFF-C17957D0EDDD@mi crosoft.com...
    >I would like to open an OpenFileDialog box with a certain prefix. For
    example all files beginning with AllState.
    >
    How do you do that?
    >
    Thanks...Arne

    Comment

    • =?Utf-8?B?QXJuZSBCZXJ1bGRzZW4=?=

      #3
      Re: OpenFileDialog

      That works thanks...but if the name is a variable (ie name = taxtbox1.text)
      do I need to enclose it in what?

      Thanks

      "Michael M." wrote:
      If I am understanding what you mean then this will work
      >
      The bit before the pipe is the description that appears in the dialog box
      OpenFileDialog1 .Filter = "(State files) | allstate*"
      >
      OpenFileDialog1 .ShowDialog()
      >
      >
      >
      "Arne Beruldsen" <ArneBeruldsen@ discussions.mic rosoft.comwrote in message
      news:C195E1BD-5F13-4F46-AFFF-C17957D0EDDD@mi crosoft.com...
      I would like to open an OpenFileDialog box with a certain prefix. For
      example all files beginning with AllState.

      How do you do that?

      Thanks...Arne
      >
      >
      >

      Comment

      • Michael M.

        #4
        Re: OpenFileDialog



        OpenFileDialog1 .Filter = "(State files) |" & TextBox1.text

        "Arne Beruldsen" <ArneBeruldsen@ discussions.mic rosoft.comwrote in message
        news:0A2FF18E-3DD8-4239-995E-A25F7D20125D@mi crosoft.com...
        That works thanks...but if the name is a variable (ie name =
        taxtbox1.text)
        do I need to enclose it in what?
        >
        Thanks
        >
        "Michael M." wrote:
        >
        >If I am understanding what you mean then this will work
        >>
        >The bit before the pipe is the description that appears in the dialog box
        >OpenFileDialog 1.Filter = "(State files) | allstate*"
        >>
        >OpenFileDialog 1.ShowDialog()
        >>
        >>
        >>
        >"Arne Beruldsen" <ArneBeruldsen@ discussions.mic rosoft.comwrote in
        >message
        >news:C195E1B D-5F13-4F46-AFFF-C17957D0EDDD@mi crosoft.com...
        >I would like to open an OpenFileDialog box with a certain prefix. For
        example all files beginning with AllState.
        >
        How do you do that?
        >
        Thanks...Arne
        >>
        >>
        >>

        Comment

        Working...