Arkadaşlar, aşağıdaki gibi bir kod yazdım; koddan istediğim belirtilen sayfalarda...
örneğin; Worksheets("EKONKUTUBEYAZKESIM").Select
bu sayfadaki a2 den başlayarak a51 e kadar hücrelere bakacak ve eğer a2 den a15 kadar hücrelerdeki değer sıfırdan büyük ise yazdırma alanını a1:h15 kadar belirleyip yazdıracak..
Acaba kodum doğrumu?
Worksheets("MINIKUTUBEYAZKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("KUCUKKUTUBEYAZKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$K$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("KUCUKKUTURENKLIKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("EKONKUTUBEYAZKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$H$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("EKONKUTULAMINEKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("LUKSKUTUBEYAZKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$K$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("LUKSKUTULAMINEKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("BUYUKKUTUBEYAZKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty
Worksheets("BUYUKKUTULAMINEKESIM").Select
For i = 2 To Range("A65536").End(3).Row
If Cells(i, "A").Value > 0 Then
ActiveSheet.PageSetup.PrintArea = "$A$1:$N$" & i
End If
Next i
ActiveSheet.PrintPreview
i = Empty