Tuesday, October 2, 2012

How to Remove a Directory or Folder using VBA Macro

Excel VBA Macro To  Remove a Directory or Folder
Sub RemoveDir()
Dim P As String
P = "C:\Documents and Settings\Administrator\My Documents"
'You Can Specify Your Desired Path Where to Remove a Directory or Folder.
'Make Sure That a Directory or Folder Should Be Empty Befor Remove.
RmDir P & "\" & "MyFolder"

End Sub

Thanks,Tamatam

No comments:

Post a Comment

Hi User, Thank You for visiting My Blog. Please post your genuine Feedback or comments only related to this Blog Posts. Please do not post any Spam comments or Advertising kind of comments which will be Ignored.