-
Here's a straightforward approach[VBA]Dim strFolderName As String
'initialize variable with table name
strFolderName = "tblSuppliers"
'trim off prefix
strFolderName = Right(strFolderName, Len(strFolderName) - 3)
'get first 5 letters
strFolderName = Left(strFolderName, 5)
'change drive and directory
ChDrive "C"
ChDir "c:\database"
'create directory
MkDir strFolderName[/VBA]You might want to look at using the FileSystemObject if you do any other file or folder manipulation - it has the added bonus of making it easy to check if files/folders exist
K :-)

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules