Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating folders on hard drive from name field
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
creating folders on hard drive from name field
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HARD DRIVE | New Users to Excel | |||
Links to mapped drive change to refer to local hard drive | Links and Linking in Excel | |||
Can I save to hard drive AND my flash drive at the same time? | Excel Discussion (Misc queries) | |||
Drive - Folders - Files | Excel Discussion (Misc queries) | |||
Erase Hard Drive | Excel Programming |