Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
filedialog selecteditems driving me crazy Mike Archer Excel Programming 0 May 29th 06 12:18 AM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"