@cadguy wrote:
I'm trying to open a folder in my documents in front of the rhino program. I can get this to work in different locations other than the my documents folder. I get the right address on the error message but it does not seem to be able to find the folder.
- List item
Sub folder()
Dim objShell, strDocuments, file, strPath 'file = "Profiles" Set objShell = CreateObject("WScript.Shell") strDocuments = objShell.SpecialFolders("MyDocuments") strPath = strDocuments 'MsgBox strDocuments & "\jewelerscad\" & file Call RunMe(strDocuments & "\jewelerscad\")
End Sub
Function RunMe(strPath)
Dim shell
On Error Resume Next
Set shell = CreateObject("WScript.Shell")
shell.Run("" & strPath & ""), 1, False
If Err.Number <> 0 Then
MsgBox "Unable to execute """ & strPath & """", 16
Err.Clear
End If
Set shell = Nothing
End Function
Posts: 1
Participants: 1