Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Create folders from list vb/macro?

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!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,441
Default Create folders from list vb/macro?

Sherri,

No need to post multiple places: here is my reply from programming:

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" wrote in message
...
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!



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 25
Default Create folders from list vb/macro?

Got it! Thanks to Bernie!

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

"Sherri" wrote:

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I create folders in explorer from an excel list njmcr Excel Discussion (Misc queries) 5 February 28th 13 12:22 PM
macro to list folders only, not files jat Excel Worksheet Functions 4 April 3rd 09 06:36 PM
Can anyone help me Create Excel list of files in windows folders solrac1956 Excel Worksheet Functions 1 November 28th 05 11:07 PM
To create folders using VBA Sri Excel Discussion (Misc queries) 1 February 4th 05 01:13 PM
How to create a macro that compares a list to another list Rampa New Users to Excel 1 January 13th 05 01:15 PM


All times are GMT +1. The time now is 09:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"