Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can't delete Folder after creating in VBA??

Status
Not open for further replies.

cresbydotcom

Technical User
May 22, 2006
234
Hi
I created folder and subfolders in VBA successfully. However after struggling to move a shortcut around (in VBA halting at the offending move) I think it left the file in limbo. The source folder cannot now be deleted in WinXP and the DOS window does not see it. XP says it is read-only and setting the attrib does not make it "not read only". The parent folder ditto. deleting in Xp fails. Deleting the parent folder in DOS does not answer. Attribs there are all clear.
My only solution is to move the folder into the WINDOWS\temp folder where it cannot get in the way
 
OK I answered myself

in XP the Archive attrib is in the Advanced dialog and I unchecked the box beneath to make them all clear but the "ready for Achiving" box was unchecked and only by checking it will it allow me to delete.

Why VBA sometimes does and and sometimes doesnt set that attrib I have no idea but running, halting and resetting VBA at various points including error like "can't find file" seem to be implicated.

Isn't Micro$oft wonderful?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top