VBA 笔记

VB迷你版下载 http://pan.baidu.com/s/1Mbcd

1、VBA中有目录树控件 
Microsoft TreeView

需要选择注册文件:MSCOMCTL.OCX
http://club.excelhome.net/thread-236735-1-1.html
2、选择文件对话框 
Private Sub CommandButton3_Click()
Dim fopen As FileDialog
Set fopen = Application.FileDialog(msoFileDialogFilePicker)
fopen.Show
Range("N1") = fopen.SelectedItems(1)
Set fopen = Nothing
End Sub

你可能感兴趣的:(vb)