- Sub OpenPath()
- Dim fd As FileDialog, FileName As String, FileFolder As String
- Set fd = Application.FileDialog(msoFileDialogFolderPicker)
- With fd
- .AllowMultiSelect = False
- If .Show = -1 Then
- FileFolder = .SelectedItems(1)
- Else
- End
- End If
- End With
- Set fd = Nothing
- End Sub
複製代碼 如何加一個判斷如果沒有選取時就不能離開FileDialog?Thanks. |