Link to home
Avatar of sheng wee
sheng wee

asked on

MkDir to create multiple folder and subfolder

how do I create "Commercial" & "Deployment" as subfolder for specific folder name based on some textbox value.

Private Sub Command58_Click()

filename = filenametxt.Value
MkDir "c:\AccessDatabase\" & Me.filenametxt.Value
MkDir "c:\AccessDatabase\" & Me.filenametxt.Value \ Commercial
MkDir "c:\AccessDatabase\" & Me.filenametxt.Value \ Deployment

What should I add in the codes
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Blurred text
THIS SOLUTION IS 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
this should do it

Dim filename As String
filename = Me.filenametxt
MkDir  "c:\AccessDatabase\" & filename
MkDir  "c:\AccessDatabase\" & filename & "\Commercial"
MkDir  "c:\AccessDatabase\" & filename & "\Deployment"