J
john philippen
Hi
i made this code
Sub bladenkopie()
Application.ScreenUpdating = False
Dim naam As String, rij As Integer
Dim teller As Integer
Dim i As Integer
Sheets(3).Select
Columns("A:A").NumberFormat = "0"
teller = Sheets.Count
rij = 2
Sheets(3).Select
naam = Cells(rij, 3).Value
Do While naam <> ""
Sheets("Blad2").Copy After:=Sheets(teller)
Sheets(Sheets.Count).Name = teller
Sheets(3).Cells(rij, 8).Copy Cells(1, 7)
Cells(1, 7).Font.ColorIndex = 2
teller = teller + 1
rij = rij + 1
naam = Sheets(3).Cells(rij, 3).Value
Loop
Application.ScreenUpdating = True
Sheets(1).Select
Range("a1").Select
End Sub
it works but after sheet 46 i get an error (code 1004)
whats wrong with it
JP
i made this code
Sub bladenkopie()
Application.ScreenUpdating = False
Dim naam As String, rij As Integer
Dim teller As Integer
Dim i As Integer
Sheets(3).Select
Columns("A:A").NumberFormat = "0"
teller = Sheets.Count
rij = 2
Sheets(3).Select
naam = Cells(rij, 3).Value
Do While naam <> ""
Sheets("Blad2").Copy After:=Sheets(teller)
Sheets(Sheets.Count).Name = teller
Sheets(3).Cells(rij, 8).Copy Cells(1, 7)
Cells(1, 7).Font.ColorIndex = 2
teller = teller + 1
rij = rij + 1
naam = Sheets(3).Cells(rij, 3).Value
Loop
Application.ScreenUpdating = True
Sheets(1).Select
Range("a1").Select
End Sub
it works but after sheet 46 i get an error (code 1004)
whats wrong with it
JP