Thread: SelectedItems
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Die_Another_Day Die_Another_Day is offline
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