+ Reply to Thread
Results 1 to 3 of 3

SelectedItems

Hybrid View

  1. #1
    Stefi
    Guest

    SelectedItems

    Hi All,

    I'd like to use in XL2003
    With Application.FileDialog(msoFileDialogFolderPicker)
    .Show
    to select a folder.
    Pressing OK works,
    .SelectedItems(1)
    returns the name of the selected folder.

    How can I deal with pressing Cancel? I tried

    If .SelectedItems(1) = "" Then
    and
    If .SelectedItems(1) is Nothing Then
    but with no success.

    Thanks,
    Stefi


  2. #2
    Stefi
    Guest

    RE: SelectedItems

    Sorry again, now I know the answer:

    If .Show = 0 Then


    Stefi

    „Stefi” ezt *rta:

    > Hi All,
    >
    > I'd like to use in XL2003
    > With Application.FileDialog(msoFileDialogFolderPicker)
    > .Show
    > to select a folder.
    > Pressing OK works,
    > .SelectedItems(1)
    > returns the name of the selected folder.
    >
    > How can I deal with pressing Cancel? I tried
    >
    > If .SelectedItems(1) = "" Then
    > and
    > If .SelectedItems(1) is Nothing Then
    > but with no success.
    >
    > Thanks,
    > Stefi
    >


  3. #3
    Die_Another_Day
    Guest

    Re: SelectedItems

    if .Show = False Then 'User Clicked Cancel

    Stefi wrote:
    > Hi All,
    >
    > I'd like to use in XL2003
    > With Application.FileDialog(msoFileDialogFolderPicker)
    > .Show
    > to select a folder.
    > Pressing OK works,
    > .SelectedItems(1)
    > returns the name of the selected folder.
    >
    > How can I deal with pressing Cancel? I tried
    >
    > If .SelectedItems(1) = "" Then
    > and
    > If .SelectedItems(1) is Nothing Then
    > but with no success.
    >
    > Thanks,
    > Stefi



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1