someone can change this Macro to browse a Folder? (not Daten-CAD).
Thanks a lot
Sorry for that. Checked the updated macro.
I would like this lines inside:
Path = BrowseFolder("Select a Path/Folder")
If Path = "" Then
MsgBox "Please select the path and try again"
Path = Path & "\"
How to change it?
I would like this lines also inside:
'Set File name
sFilename = InputBox(Prompt:="Add File Name Here", Title:="ENTER FILE NAME", Default:="_")
If sFilename = "Add File Name Here" Or sFilename = vbNullString Then
MsgBox "Please Enter File Name first!"
Try the macro from post below attached one, modify as needed.
thank you for your anwer.
I get an error?
works great, thank you very much!!!!
2013 SOLIDWORKS API Help - GetOpenFileName Method (ISldWorks)
Alternatively, in a userform, under command button CommandButton1, you can use
Private Sub CommandButton1_Click()
Dim fs As FileSystemObject
Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.browseforfolder(0, "Select the folder:", 0, 0)
If Not objFolder Is Nothing Then
Set objFolderItem = objFolder.self
YourTextBox.Text = objFolderItem.Path 'The folder path selected by user will be assigned to "LocationText" textbox
Else: Exit Sub
Retrieving data ...