XL: Macro Cannot Scroll Chart Windows

Last reviewed: February 2, 1998
Article ID: Q106004

The information in this article applies to:
  • Microsoft Excel for Windows, versions 5.0, 5.0c
  • Microsoft Excel for the Macintosh, versions 5.0, 5.0a
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel 98 Macintosh Edition

SUMMARY

In Microsoft Excel, you have the ability to scroll a chart window either vertically or horizontally. However, you cannot scroll a chart window from a Visual Basic for Applications procedure or from a macro.

MORE INFORMATION

Microsoft Excel versions 5.0 and later

In Visual Basic, you can use the SmallScroll and LargeScroll methods to scroll a worksheet or a Microsoft Excel macro sheet window. Each method accepts up to four arguments, indicating the number of rows or columns to scroll down, up, right, and left.

Microsoft Excel versions 4.0, 5.0, and 7.0

In a Microsoft Excel 4.0 macro, you can use any of six functions to scroll a worksheet or a Microsoft Excel 4.0 macro sheet:

   This macro function   Does this
   ------------------------------------------------------------------

   VLINE                 Scrolls vertically through the active
                         window by the number of rows specified.

   VPAGE                 Scrolls vertically through the active window
                         by the number of windows specified ("window"
                         defined as the number of rows visible at any
                         given time).

   VSCROLL               Scrolls vertically through the active window
                         to the row specified.

The HLINE, HPAGE, and HSCROLL functions work similarly, but these functions scroll the window horizontally instead of vertically.

If you attempt to use any of the above methods or functions when the active window is a chart window, you will receive an error message. This limitation does not affect other macro functions or methods because items in charts do not need to be visible in order to be affected by macros in Microsoft Excel.


Additional query words: 5.00 5.00a 5.00c 7.00
Keywords : kbprg PgmHowto PgmOthr kbtlc
Version : WINDOWS:5.0,5.0c,7.0,97; MACINTOSH:5.0,5.0a,98
Platform : MACINTOSH WINDOWS
Issue type : kbhowto


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.