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
Microsoft AccessVBA

Avatar of undefined
Last Comment
Rey Obrero (Capricorn1)

8/22/2022 - Mon
Ryan Chong

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Rey Obrero (Capricorn1)

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"
Your help has saved me hundreds of hours of internet surfing.