I am trying to make a new folder to hold VBA Examples on the New Apple I only just purchased.
The supplied code contains a syntax error in the ninth line. It was copied from Ron deBruin's site and appears to be an accurate copy. All that I have altered is the actual path name required for the folder to be created in.
VB:Sub MakeFolderIfNotExist() Dim FolderString As String Dim ScriptToMakeDir As String 'Make folder named VBAExamples on the harddrive FolderString = MacScript("return (path to harddrive folder) as string") & "VBAExamples:" 'Or enter the complete path 'FolderString = "Macintosh HD:Users:Edward Eggleston:VBAExamples:" ScriptToMakeDir = "tell application " & Chr(34) & "Finder" & Chr(34) & Chr(13) [COLOR=Red]ScriptToMakeDir = ScriptToMakeDir & "do shell script ""mkdir -p "" & quoted _ form of posix path of " & Chr(34) & FolderString & Chr(34) & Chr(13) [/COLOR] ScriptToMakeDir = ScriptToMakeDir & "end tell" On Error Resume Next MacScript (ScriptToMakeDir) On Error GoTo 0 End SubFormatting tags added by mark007