LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Creating directories from given column of data

Hi all,

I'm very new at VBA and am trying to figure out how to create a macro
that takes the data entered in Column A and then generates directories
using the data in each cell in Column A.

Example

A1: Cat
A2: Dog
A3: Snake

Generating directories wherever I designate titled "Cat," "Dog,"
"Snake," etc.

The initial code I have found allows me to generate a directory though
only from "A1"

Sub CreateDirectoy()
Dim strDir As String

strDir = "C:\" & Sheet1.Range("A1")
On Error Resume Next
If Dir(strDir) = "" Then MkDir strDir


End Sub

How do I have this piece of code apply to all of column A?

I know this is surely rudimentary to everyone, so please forgive me in
advance.

Best wishes and many, many thanks,

Kelly






*** Sent via Developersdex http://www.developersdex.com ***
 
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
creating directories freekrill Excel Discussion (Misc queries) 1 July 25th 05 09:26 AM
Creating Directories wardides[_6_] Excel Programming 1 October 15th 04 12:24 AM
Creating Directories wardides[_5_] Excel Programming 0 October 13th 04 02:08 PM
Creating Directories wardides[_4_] Excel Programming 1 October 6th 04 03:48 PM
Creating Directories Keith[_11_] Excel Programming 3 June 23rd 04 12:44 PM


All times are GMT +1. The time now is 10:56 PM.

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

About Us

"It's about Microsoft Excel"