The information in this article applies to:
SYMPTOMSIn Microsoft Project, you may not be able to use the Change Working Time dialog box to change the working and nonworking days on the calendar after you run a macro that edits the base calendar. CAUSE
This behavior occurs if you use the Working property in a Visual Basic,
Applications Edition, macro to set the working or nonworking days for a
date range on the base calendar. The problem occurs if the date range you
specify extends beyond one month. When this occurs, you cannot use the
Change Working Time dialog box to change the working time for the days in
the second and following months in that date range.
when you open the Change Working Time dialog box, and select the month of
April 1995, you cannot select the Working option for any of the days in
this month. The Nonworking option remains selected for each day in the
range 3/29/95 to 5/5/95.
WORKAROUNDSTo work around this problem, use any of the following methods. Method 1Use the BaseCalendarEditDays Method to edit the base calendar as in the following example:
Method 2Use the Working Property of the Period object with one month intervals. For example, use the following three commands to set the Working property to the value False for the entire range 3/29/95 to 5/5/95 instead of one command:
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. For more information about Visual Basic for
Applications programming style, see the "Programming Style in This Manual"
section in the "Document Conventions" section of the "Visual Basic User's
Guide."
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONFor additional information, please see the following article(s) in the Microsoft Knowledge Base: Q126987 Exceptions Lost After Running Macro to Edit Calendar REFERENCESFor more information about the BaseCalendars Method, choose the Search button in the Visual Basic Reference and type: BaseCalendarsFor more information about the Working Property, choose the Search button in the Visual Basic Reference and type: WorkingFor more information about the BaseCalendarEditDays Method, choose the Search button in the Visual Basic Reference and type: BaseCalendarEditDays Additional query words:
Keywords : kbcode kbprg |
Last Reviewed: October 18, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |