VB Code:
dim mypath as string="" With FolderBrowserDialog1 .SelectedPath = My.Settings.defaultdir .ShowNewFolderButton = False .Description = "Choose your folder" .ShowDialog() If Len(.SelectedPath) Then mypath= .SelectedPath End With if mypath="" then exit sub '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"


Reply With Quote