The following code ends in print preview starting line 7 and not line 4. any
suggestions please. I changed A7 to A4 in the with statement and still the
same problem.
Sub Picture22_Click()
Dim c As Range
Application.ScreenUpdating = False
With ActiveSheet.Range("A7:A159")
Do
Set c = .Find("", LookIn:=xlValues, LookAt:=xlWhole, _
MatchCase:=False)
If c Is Nothing Then Exit Do
c.EntireRow.Hidden = True
Loop
.Range("A4:D160").PrintPreview
.EntireRow.Hidden = False
End With
Application.ScreenUpdating = True
End Sub
Dave Peterson - 07 Mar 2008 00:09 GMT
This statement:
With ActiveSheet.Range("A7:A159")
....
.Range("A4:D160").PrintPreview
is the same as:
ActiveSheet.Range("A7:A159").Range("A4:D160").PrintPreview
Which points at A10:D166
You may want:
.parent.Range("A4:D160").PrintPreview
> The following code ends in print preview starting line 7 and not line 4. any
> suggestions please. I changed A7 to A4 in the with statement and still the
[quoted text clipped - 16 lines]
> Application.ScreenUpdating = True
> End Sub

Signature
Dave Peterson
Khalil handal - 07 Mar 2008 06:41 GMT
Hi,
Thanks
> This statement:
>
[quoted text clipped - 34 lines]
>> Application.ScreenUpdating = True
>> End Sub