EXCEL-VBA:调用打开文件夹对话框,选择路径

    With Application.FileDialog(msoFileDialogFolderPicker)
        .InitialFileName = ActiveSheet.TextBox1.Value
        .Title = "请选择目录"
        If .Show Then
            ActiveSheet.TextBox1.Value = .SelectedItems(1) & "\"
        End If
    End With

你可能感兴趣的:(OFFICE-EXCEL,VBA)