PC Review


Reply
Thread Tools Rate Thread

Create folder macro or vb code?

 
 
Sherri
Guest
Posts: n/a
 
      13th May 2009
I am a novice. I need to create about two hundred folders in a specific
folder on an external drive. I have a list of the names for these folders in
an excel file. For example, Sheet1, A1 says Folder_Name, and the list of
names is in A2 thru A200. Anyone have code that will create these folders for
me?

Thanks!
 
Reply With Quote
 
 
 
 
Bernie Deitrick
Guest
Posts: n/a
 
      13th May 2009
Sherri,

With that sheet active:


Sub MakeFolders()
Dim myC As Range
For Each myC In Range("A2", Cells(Rows.Count, 1).End(xlUp))
MkDir "D:\Foldername\" & myC.Value
Next myC
End Sub

HTH,
Bernie
MS Excel MVP


"Sherri" <(E-Mail Removed)> wrote in message
news:EBF2C006-3F58-4F98-AEDC-(E-Mail Removed)...
>I am a novice. I need to create about two hundred folders in a specific
> folder on an external drive. I have a list of the names for these folders in
> an excel file. For example, Sheet1, A1 says Folder_Name, and the list of
> names is in A2 thru A200. Anyone have code that will create these folders for
> me?
>
> Thanks!



 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      13th May 2009
see the Create Folder message at about 15:05 today -- its the same question
already answered with slight modification


"Sherri" <(E-Mail Removed)> wrote in message
news:EBF2C006-3F58-4F98-AEDC-(E-Mail Removed)...
> I am a novice. I need to create about two hundred folders in a specific
> folder on an external drive. I have a list of the names for these folders
> in
> an excel file. For example, Sheet1, A1 says Folder_Name, and the list of
> names is in A2 thru A200. Anyone have code that will create these folders
> for
> me?
>
> Thanks!


 
Reply With Quote
 
Sherri
Guest
Posts: n/a
 
      13th May 2009
Wow! That worked and could not have been easier! Thanks, Bernie!!

"Bernie Deitrick" wrote:

> Sherri,
>
> With that sheet active:
>
>
> Sub MakeFolders()
> Dim myC As Range
> For Each myC In Range("A2", Cells(Rows.Count, 1).End(xlUp))
> MkDir "D:\Foldername\" & myC.Value
> Next myC
> End Sub
>
> HTH,
> Bernie
> MS Excel MVP
>
>
> "Sherri" <(E-Mail Removed)> wrote in message
> news:EBF2C006-3F58-4F98-AEDC-(E-Mail Removed)...
> >I am a novice. I need to create about two hundred folders in a specific
> > folder on an external drive. I have a list of the names for these folders in
> > an excel file. For example, Sheet1, A1 says Folder_Name, and the list of
> > names is in A2 thru A200. Anyone have code that will create these folders for
> > me?
> >
> > Thanks!

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to create a new folder in my personal folder 00033000 Microsoft Outlook VBA Programming 3 4 Weeks Ago 01:02 AM
How to create a macro to incorporate the following code Jack Microsoft Access Form Coding 1 14th Jan 2009 11:15 PM
Macro code to create a toolbar? Do what I can, but I''m only one man. Microsoft Excel Misc 3 24th Oct 2008 12:08 AM
How do I Create a Macro to run VB Code in Excel? Gator Microsoft Excel Programming 7 8th Jan 2008 05:43 PM
How do I create a message box using macro/code? =?Utf-8?B?dGFyemFuMTIzX3Vz?= Microsoft Access Macros 1 14th Feb 2006 06:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:17 PM.