Excel VBA 对话框选择文件或者文件夹函数实现源码
1.0 VBA
Reference: Microsoft Scriptiong Runtime
1.1 FOLDER精简版
Private Function IChooseFolder() As String
Dim dlgOpen As FileDialog
Set dlgOpen = Application.FileDialog(msoFileDialogFolderPicker)
If dlgOpen.Show = -1 Then IChooseFolder = dlgOpen.SelectedItems(1)
Set dlgOpen = Nothing
End Function
1.2 FOLDER增强版
Private Function IFolderPicker() As String
Dim FolderDialogObject As Fi
版权声明:
作者:lichengxin
链接:https://www.techfm.club/p/14535.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。
THE END
二维码
共有 0 条评论