Archive of Mr Excel Message Board
I am working in Excel 97. I am trying to write a macro that first of all checks for the existance of a folder and if it doesn't exist it creates it. I can do it in Excel 2000 using the CREATEOBJECT("SCRIPTING.FILESYSTEMOBJECT") within a macro but my LAPTOP running office 1997 will not recognise this and keep saying "can't create object".
Any Ideas ? I'm also looking for similar info on deleting folders if they exist.

| Check out our Excel VBA Resources | ||||
![]() |
![]() |
![]() |
![]() |
![]() |
That would suggest that you don't have the necessary file on your laptop. Search for scrrun.dll on your laptop and if it's there set a reference to it in the VB editor (Tools, references, Browse to the file). If you don't have the file you can download it from Microsoft here - http://www.microsoft.com/msdownload/vbscript/scripting.asp
Hope this helps,
Dax.

Have a look @ online help
Ivan
