Project: Macro Problems Caused By Scroll Lock
  
PSS ID Number: Q102867
Article last modified on 03-15-1995
 
3.00 3.00a
 
WINDOWS
 

------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Project for Windows, versions 3.0, 3.0a
------------------------------------------------------------------
 
In Microsoft Project for Windows, if Scroll Lock is turned on, the
following Microsoft Project macro commands will not work as expected:
SelectCellDown, SelectCellUp, SelectCellLeft, SelectCellRight,
SelectRowStart, and SelectRowEnd.
 
   This Macro Function       Behaves this Way
   -----------------------------------------------------------------
 
   SelectCellDown          The active cell does not change.
   SelectCellUp            The active cell does not change.
   SelectCellLeft          The active cell does not change.
   SelectCellRight         The active cell does not change.
 
   SelectRowStart          The cursor moves to the first unlocked
                           column in the first row.
 
   SelectRowEnd            The current cell changes to an unpredictable
                           row and column.
 
Most keyboards have a Scroll Lock key and a corresponding light to
indicate whether Scroll Lock is turned on. When you are using
Microsoft Project and Scroll Lock is turned on, the active cell will
not move when you attempt to scroll.
 
Although Scroll Lock cannot be turned off with a macro command, you
can write a macro that detects if Scroll Lock is turned on.
 
The following macro assumes there are less than 20 windows open, and
the default view is the task entry view:
 
1. Enter two tasks: Task1 and Task2.
 
2. From the Macro menu, choose Define Macros and choose New.
 
3. Type the following Macro:
 
   SelectBeginning     //Select Id 1.
   SelectCellDown     //Try to move down one row.
   If CheckField .Field=[Id] .Value=[1]     //If active cell didn't change
...
      Message "Turn off Scroll Lock and THEN choose OK to this message."
   Endif
 
4. Enter the remainder of your macro after the "Endif" command.
 
NOTE: This problem does not apply to Microsoft Project for the
Macintosh. Microsoft Project for the Macintosh ignores
Scroll Lock.
 
KBCategory: kbusage
KBSubcategory:
 
Additional reference words: 3.00 3.00a
=============================================================================
Copyright Microsoft Corporation 1995.
