Sorry, typo
Sub CopynReNameFiles()
Dim LastRow As Long
Dim i As Long
With ACtiveSheet
LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = 1 To LastRow
FileCopy "D:\Max\DBrT.xls", _
"D:\Max\DBrT\" & .Cells(i, "A").Value & ".xls"
Next i
End With
End Sub
--
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Bob Phillips" <(E-Mail Removed)> wrote in message
news:Op$(E-Mail Removed)...
> Sub CopynReNameFiles()
> Dim LastRow As Long
> Dim i As Long
>
> With ACtiveSheet
>
> LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
> For i = 1 To LastRow
>
> FileCopy "D:\Max\DBrT.xls", "D:\Max\DBrT\" & .Cells(iI,
> "A").Value & ".xls"
> Next i
> End With
> End Sub
>
>
> --
> HTH
>
> Bob
>
> (there's no email, no snail mail, but somewhere should be gmail in my
> addy)
>
> "Max" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Sub CopynReNameFiles()
>> FileCopy "D:\Max\DBrT.xls", "D:\Max\DBrT\Dxx1.xls"
>> FileCopy "D:\Max\DBrT.xls", "D:\Max\DBrT\Dxx2.xls"
>> FileCopy "D:\Max\DBrT.xls", "D:\Max\DBrT\Dxx3.xls"
>> 'etc etc
>> End Sub
>>
>> How could the above sub be amended to loop through
>> & read-in/use all the destination file names, ie:
>>
>> Dxx1
>> Dxx2
>> Dxx3
>> etc, etc
>>
>> from the list of 100+ names
>> that's already placed in col A in the active sheet?
>>
>> Thanks for insights
>>
>
>
|