PRJ4: Recorded Dialog Filter Displays Dialog Box
  
PSS ID Number: Q112999
Article last modified on 04-06-1995
 
4.00    | 4.00
 
WINDOWS | MACINTOSH
 

---------------------------------------------------------------------
The information in this article applies to:
 
 - Microsoft Project for Windows, version 4.0
 - Microsoft Project for the Macintosh, version 4.0
---------------------------------------------------------------------
 
SUMMARY
=======
 
In Microsoft Project, if you apply a filter that displays a dialog
box while the macro recorder is running, the resulting macro displays
the filter dialog box instead of applying the filter.
 
WORKAROUND
==========
 
If you want to use a macro to apply a filter that displays a dialog
box, without displaying the dialog box, edit the macro to apply the
filter instead of recording the macro.
 
For example, when you run the following command
 
   FilterApply Name:="Tas&k Range...", value1:="3", value2:="6"
 
the Task Range filter is applied and only tasks between ID 3 and ID 6 are
displayed, and the Task Range dialog box does not appear.
 
Microsoft provides examples of Visual Basic procedures for
illustration only, without warranty either expressed or implied,
including but not limited to the implied warranties of
merchantability and/or fitness for a particular purpose. This Visual
Basic procedure is provided 'as is' and Microsoft does not guarantee
that it can be used in all situations. Microsoft does not support
modifications of this procedure to suit customer requirements for a
particular purpose. Note that a line that is preceded by an
apostrophe introduces a comment in the code--comments are provided to
explain what the code is doing at a particular point in the
procedure. Note also that an underscore character (_) indicates that
code continues from one line to the next. You can type lines that
contain this character as one logical line or you can divide the
lines of code and include the line-continuation character.
 
MORE INFORMATION
================
 
The filters that display a dialog box are Date Range, Resource Group,
Should Start By, Task Range, Using Resource, Group, and Resource
Range.
 
When you turn on the macro recorder and apply the Task Range filter
to show tasks between ID 3 and ID 6, the following command is
recorded:
 
   FilterApply Name:="Tas&k Range..."
 
When you run this macro, the Task Range filter dialog box appears.
 
Steps To Reproduce Behavior
---------------------------
 
1. In a new project, enter 11 tasks.
 
2. From the Tools menu, choose Record Macro. Choose the Options button, and
   under Store Macro In, select the Current Project File option. Choose OK.
 
3. From the Tools menu, choose Filtered For and then choose Task Range. In
   the Show Tasks Between ID box, enter 3. In the And ID box, enter 6.
   Choose OK.
 
4. From the Tools menu, choose Stop Recorder.
 
5. From the Tools menu, choose Macros. From the Macro Name list, select the
   name of the macro you recorded in Step 2 and choose Run.
 
Note that the macro displays the Task Range dialog box instead of
applying the filter you recorded.
 
KBCategory: kbprb
KBSubcategory:
 
Additional reference words: 4.00
=============================================================================
Copyright Microsoft Corporation 1995.
