Elmo Erasmus
asked on
Create and delete folder using VBA
Hi All
I need some code that will create a folder on the C drive after i've done what i needed i need to delete the folder again. I need to do this with VBA from a button on an Access Form.
Thanks in advance
Elmo
I need some code that will create a folder on the C drive after i've done what i needed i need to delete the folder again. I need to do this with VBA from a button on an Access Form.
Thanks in advance
Elmo
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Dim fsys As New Scripting.FileSystemObject
fsys.CreateFolder "C:\Myfolder"
'Do your stuff
fsys.DeleteFolder "C:\Myfolder", True
Needs tools -> references, check MS scripting runtime
fsys.CreateFolder "C:\Myfolder"
'Do your stuff
fsys.DeleteFolder "C:\Myfolder", True
Needs tools -> references, check MS scripting runtime
Posted too late. LSM posted what you need.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
ASKER
Thanks for all the quick responces
ASKER