Saving files with a list of values

S

Sérgio Lopes

I would like to know if it is possible to save several files of excel with
especific names from a list.

For exemple:

I have to do every months a save of the exact same file with 200 diferent
names (one for each worker).

So, is it possible to make a list of the names of all these workers a then
say to excel to save a file for each of these names in the list??

If so, please help me!!!
 
P

papou

Hello Sergio
This is possible using VBA.
Here is a sample code to achieve this :
With Worksheets("Sheet1")'***
For i = 1 to .Range("A65536").End(xlup).row '***
Thisworkbook.SaveAs .Cells(i,1) '***
Next i
End With

(***please amend accordingly)
HTH
Cordially
Pascal
 
S

Sérgio Lopes

Honestly VBA is not my hobby.

I thank you a lot but it was not so helpfull because of the ***.

Can you help me a bit further more??

Thanks,
 
S

Sérgio Lopes

I would Like to answer to my question. I have already found it.

VBA code:

Private Sub CommandButton1_Click()
Dim s As String
Dim I As Integer
Dim d As Integer


For d = 1 To 5
Sheets("Sheet1").Select
s = Range("A" & d).Text




txt1.Caption = s
ActiveWorkbook.SaveAs Filename:="\\tbraga\Areas$\a2401799\" & s, _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
Next

End Sub

If I can help anyone, please tell me.

Thanks,
 
Top