Your Products have been synced, click here to refresh
It seems that I need to use the File I/O Command File Dialog but I can't figure out how to direct the "Open" location?
Option Explicit Private Const BIF_RETURNONLYFSDIRS As Long = &H1 Function BrowseFolder(Optional Caption As String, Optional InitialFolder As String) As String Dim SH As Object Dim F As Object Set SH = CreateObject("Shell.Application") Set F = SH.BrowseForFolder(0&, Caption, BIF_RETURNONLYFSDIRS, InitialFolder) If Not F Is Nothing Then BrowseFolder = F.Items.Item.Path End If End Function Sub main() MsgBox BrowseFolder ("Caption", "C:\TEMP") End Sub
It seems that I need to use the File I/O Command File Dialog but I can't figure out how to direct the "Open" location?
Option Explicit Private Const BIF_RETURNONLYFSDIRS As Long = &H1 Function BrowseFolder(Optional Caption As String, Optional InitialFolder As String) As String Dim SH As Object Dim F As Object Set SH = CreateObject("Shell.Application") Set F = SH.BrowseForFolder(0&, Caption, BIF_RETURNONLYFSDIRS, InitialFolder) If Not F Is Nothing Then BrowseFolder = F.Items.Item.Path End If End Function Sub main() MsgBox BrowseFolder ("Caption", "C:\TEMP") End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |