Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Shell.Run "cd """ & MyDocumentsPath & """", 1, True
- Shell.Run "cd " & Chr(34) & MyDocumentsPath & "Chr(34)", 1, True
- Shell.Run "cd ""C:UsersGardD""", 1, True
- Dim Shell As Object ' An instance of the 'Shell' object
- Set Shell = VBA.CreateObject("WScript.Shell")
- Dim MyDocumentsPath As String ' The path to the current users 'My Documents' folder
- MyDocumentsPath = GetMyDocumentsPath
- Shell.Run "cd " & MyDocumentsPath, 1, True ' Change the Shell start location to the users 'My Documents' folder
- Shell.Run DIR_CMD & DIR_FILE_PATH, 1, True ' Output the full file paths of all files in the users 'My Documents' folder
- Set Shell = Nothing ' Destroy the 'Shell' object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement