VB Code:
  1. dim mypath as string=""
  2. With FolderBrowserDialog1
  3.             .SelectedPath = My.Settings.defaultdir
  4.             .ShowNewFolderButton = False
  5.             .Description = "Choose your folder"
  6.             .ShowDialog()
  7.             If Len(.SelectedPath) Then mypath= .SelectedPath
  8.  End With
  9.  
  10. if mypath="" then exit sub
  11.  
  12. 'rest of code here

i use that code to let users to select a folder.... with default directory shown when dialog is opened... but when i click on "close" or "cancel" in folderdialog....it still acts as if i selected a folder...(i.e. it continues....in the section of code).... i want it to exit sub when users pres "close" or "cancel"