ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   odd issue with a loop (https://www.excelbanter.com/excel-programming/423936-odd-issue-loop.html)

Joseph Atie

odd issue with a loop
 
For counter = 1 To scount
sstring = Cells(counter + 82, 2).Value
Sheets(sstring).Select
ActiveSheet.PageSetup.Zoom = 75
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Next counter

the above section of code works for the first iteration of the loop on the
second iteration it fails to give sstring a value.

is there something wrong with the code?

p.s the aim of the code is to print off a number of sheets


All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com