VBA get path to the folder with the built-in dialog

Sub folder path ()
Dim $ fp, obmapp of As Object
the Set obmapp = CreateObject ( "of the Shell.Application") the BrowseForFolder (0, "select the file directory:", 0, 0).
The If Not obmapp Nothing Is is the Then
fp = obmapp & .Self.Path ""
Else
Exit Sub
End the If
MsgBox fp
End Sub

Guess you like

Origin www.cnblogs.com/zhujie-com/p/11695608.html