DOSYA İndirmek/Yüklemek için ÜCRETLİ ALTIN ÜYELİK Gereklidir!
Altın Üyelik Hakkında Bilgi
Sub DosyaOlustur()
Dim dsy As New Workbook
Set dsy = Workbooks.Add
With ThisWorkbook.Worksheets("Sayfa1")
dsy.SaveAs (.Range("A1").Value & "\" & .Range("B1").Value)
dsy.Close True
End With
End Sub
Sub DosyaOlustur()
Application.DisplayAlerts = False
Dim dsy As New Workbook
For i = 1 To Range("A" & Rows.Count).End(3).Row
Path = Range("b" & i)
If Right(Path, 1) <> "\" Then Path = Path & "\"
Name = Range("A" & i) & ".xls"
Set dsy = Workbooks.Add
With ThisWorkbook.Worksheets("Sayfa1")
dsy.SaveAs (Path & Name)
dsy.Close True
End With
Next i
End Sub
Kodları aşağıdaki ile değiştirip deneyin.
Kod:Sub DosyaOlustur() Application.DisplayAlerts = False Dim dsy As New Workbook For i = 1 To Range("A" & Rows.Count).End(3).Row Path = Range("b" & i) If Right(Path, 1) <> "\" Then Path = Path & "\" Name = Range("A" & i) & ".xls" Set dsy = Workbooks.Add With ThisWorkbook.Worksheets("Sayfa1") dsy.SaveAs (Path & Name) dsy.Close True End With Next i End Sub