Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 vba create full path
Index -> Programming, Visual Basic and Other Basics -> Other Basics
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
greenapplesodaex




PostPosted: Mon Apr 18, 2005 10:33 am   Post subject: vba create full path

how do i create a full path in vba?
say i want to make "c:\folder1\folder2\folder3\", if folder1 or folder2 is missing, it will give me error, is there a way so that it can fill in the missing folders automaticlly?
Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Mon Apr 18, 2005 5:40 pm   Post subject: (No subject)

So, you want to make a folder at a specific location? Or do you want to make a bunch of folders that are within each other?
If it's the latter, you could just create them one by one within each other. Not too difficult. If it's the former, you could probably first use a DIR command to determine if a folder with the name you want already exists. If one doesn't exist, make it. Then put your next folder in there.

And what do you mean by automatically? Are you trying to tell the vba in one line to "make a directory at C:\f1\f2\f3 and if f1 or f2 doesn't exist, make it"? If so, I doubt vba can do it. If it can, dandy!
Display posts from previous:   
   Index -> Programming, Visual Basic and Other Basics -> Other Basics
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: