akokin
08-27-2007, 12:26 PM
Hello.
Whether you can explain me sense of a following code by the line? Thismacro gave from site Allan Wyatt which allows to will cycle forwards through the windows:
Sub ChangeWin()
On Error GoTo ChangeWinErr
Set bb = ActiveWindow.Next
If Windows.Count > 1 Then
bb.Activate
Exit Sub
End If
ChangeWinErr:
Windows(1).Activate
End Sub
Why it is impossible to use one line of a code simply:
ActiveDocument. ActiveWindow. Next. Activate?
Thanks.
Whether you can explain me sense of a following code by the line? Thismacro gave from site Allan Wyatt which allows to will cycle forwards through the windows:
Sub ChangeWin()
On Error GoTo ChangeWinErr
Set bb = ActiveWindow.Next
If Windows.Count > 1 Then
bb.Activate
Exit Sub
End If
ChangeWinErr:
Windows(1).Activate
End Sub
Why it is impossible to use one line of a code simply:
ActiveDocument. ActiveWindow. Next. Activate?
Thanks.