Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Create folder macro or vb code?

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.programming
external usenet poster
 
Posts: 5,441
Default Create folder macro or vb code?

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" 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.programming
external usenet poster
 
Posts: 1,049
Default Create folder macro or vb code?

see the Create Folder message at about 15:05 today -- its the same question
already answered with slight modification


"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!


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Create folder macro or vb code?

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" 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!




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
Code to create folder and subfolders JP[_3_] Excel Programming 4 November 2nd 07 07:16 PM
Create New Folder Using Code Nigel Excel Programming 2 May 22nd 07 06:29 PM
Save file in a new folder, but create folder only if folder doesn't already exist? nbaj2k[_40_] Excel Programming 6 August 11th 06 08:41 PM
How do I create a new folder using a macro rsabot Excel Programming 2 May 22nd 05 12:59 PM
Macro to create folder yo beee Excel Programming 1 October 21st 03 02:10 AM


All times are GMT +1. The time now is 11:17 AM.

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"