View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Italian Pete Italian Pete is offline
external usenet poster
 
Posts: 4
Default creating folders on hard drive from name field


Thanks Bob. Worked a treat.
"Bob Phillips" wrote:

Something like

Const kBaseFolder As String = ":C:\Staff\Photos\"

For i = 1 To cells(Rows.Count,"A").End(xlUp).Row
makdir kBaseFolder & Cells(i,"B").Value & "-" & Cells(i,"A").Value
Next i

I have added the forename as well, just in case there are tow with the same
surname.

--
HTH

Bob Phillips

"Italian Pete" wrote in message
...
Hi,
I have an excel spreadsheet containing information about people. The
first two columns are name and surname. In addition, for each person,

there
is a separate photo (not attached to the spreadsheet). I need to create a
folder for each of the people on the spreadsheet such that I can put their
photo into it. I would like each of the folders to be named name.surname
taken from the spreadsheet. I'm a bit of a newbee to VBA in Excel. How

would
I go about doing this?

many thanks,

Pete