[Help] How to create a new folder following client's name
I want to make a button which automatically creates a new folder that its name is following the name of the client.
I put more details in the GG Drive link bcz the attached file size is 2MB > 500KB limit of the forum
Please take a look, thank you guys!
Public Sub MakeFolder(strPath As String)
Dim strCName aAs String
strCName = Me.txtClientName.Value 'Or where ever you choose to get the name from.
MkDir strPath & "\" & strCName
End Sub
The attached example will add a "Clients" folder in the application directory. You can enter a name and it will add a client folder named after the client in that Clients folder.
I added a list box to show all the client folders in the master client folder.
There is also a list box to show all the files in a selected clients folder.
In the demo I added a sub to create a text file within the clients folder. This is just to show the flexibility of FSO and demonstrate the file listbox.
note that I used late binding for the FSO object.
If this helped, please click the star * at the bottom left and add to my reputation- Thanks