About
Pricing
Community
Teams
Start Free Trial
Log in
chestera
asked on
1/1/2014
Rename and Delete sub folders
Hi
I have folders on dropbox. as follows
C:\Users\Public\Dropbox\Cl
ient\Direc
tSales\Env
irpPacific
.
My question is how can I using vba change the name or delete the folder EnviroPacific
I can change a root folder name
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\Zmyfolder"
strNewDirName = "C:\Pfolder"
Name strOldDirName As strNewDirName
I get errors when I add Sub folders.
Any help would be appreciated
chestera
Microsoft Development
Microsoft Access
4
2
Last Comment
chestera
8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Scott McDaniel (EE MVE )
1/2/2014
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
Jim Dettman (EE MVE)
1/2/2014
THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
chestera
1/2/2014
ASKER
Jim Dettman
My apologies. With my example I got and error on the last line Name path not found although the path was or looked correct so I rewrote as follows
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\FolderA\FolderB"
strNewDirName = "C:\FolderA\FolderC\"
Name strOldDirName As strNewDirName
This time no problems. Must have been a glitch in my first attempt
I will split the points
Alan
chestera
1/2/2014
ASKER
many thanks feeling a bit foolish
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
My apologies. With my example I got and error on the last line Name path not found although the path was or looked correct so I rewrote as follows
Dim strOldDirName As String
Dim strNewDirName As String
strOldDirName = "C:\FolderA\FolderB"
strNewDirName = "C:\FolderA\FolderC\"
Name strOldDirName As strNewDirName
This time no problems. Must have been a glitch in my first attempt
I will split the points
Alan