I tried it your way. Made a directory. and used your method to delete it.
It was as I suspected: the object was not created: error 91, Object variable or block object variable not set.
A directory is not an object. An object has properties, methods, and or events.
Objects are encapsulated — that is, they contain both their code and their data, making them more easier to maintain than traditional ways of writing code.
Visual Basic objects have properties, methods, and events. Properties are data that describe an object. Methods are things you can tell the object to do. Events are things the object does; you can write code to be executed when events occur.(MSDN: Programming with objects) Set objdir = New Scripting.FileSystemObject