problems with hidden sheets in for each
Hey People!
I have a for inside another for. It searches factories and then production
lines. As the number of production lines is different in each factory's file,
I have to use the for each command.
I wrote a code as follows:
For Each obj In Sheets
Sheets(i).Select
feuil = ActiveSheet.Name
'ActiveWindow.SelectedSheets.PrintOut
MsgBox ("Le " & feuil & " du " & "0703_S03_" & usi & " a été
imprimé")
i = i + 1
Next obj
The problem is that there are hidden sheets and the For command consider
them too. So it bugs in the shhet(i).select command. I tryed puting "For Each
obj.visible = true In Sheets", but VBA did not accept either.
Do you have any ideas??? Thanks in advance.
Daniel (Brazil)
|