home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
On Hand
/
On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso
/
00003
/
s
/
latedate.fr$
/
latedate.bin
(
.txt
)
Wrap
Visual Basic Form
|
1993-01-01
|
31KB
|
622 lines
LatedateForm
wwwww
wp|||
wwp|||
wwwp|||
wwwwwwww
Form1
Picture2
SystemText
SystemText
FileText
FileText
Label2
!Microsoft Project Conflict Finder
Label1
XFor distribution, modification, and usage information, please read the file SAMPLES.WRI.
Label4
=Copyright
1992 Microsoft Corporation. All rights reserved.
Resolve_Btn_Click
Quit_Btn_Click
MainForm
LinText
LinkTopic
LinkText
LinkItemw
LinkModeQ
COLD\
NONEy
ProjName
SystemText#
FileText
UN_ID
Search
Check_ConflictH
ActStart
ConstType
TRUEP
FALSE
Find_SubTask
Last_SubA
OutlineNum
SubNum
SchedStart
LastSub_ID
SStartSum
StartSumj
StartSub
StartSummary
index
SubOutNuma
SubOutBase
Last_SubID
FileText_Change8
FileText_LinkErrorW
LinkErrk
Init_Links
Result
Succ_Str9
NextTask>
SuccStr
LastSub
IfEndX
ConflictPath
CurrentID
summary
Find_Succ
LastSuccc
tempS
Pred-
checked5
beginsV
alsok
removes
preceding
successor
unchecked
PredFinish
FileTextTe]
Succz
Find_Next_Succ
SuccID
SuccStart
Log_Problem
thenLog_ProblemK
SuccList
Find_Succ_Conflicts`
Find_Succ_Conflict3
temp1`
temp2
SummList
whichE
Find_SubTask_ConflictE
Procedure
SummStart
SummID
OutlineSummI
SubStart
BaseOutline
OutlineIDo
Outline
Done-
ConflictList;
LogNum!
SystemText_Change
List1
Form_Click
constraintc
Actual
ProbType
CONSTRAINED
STARTED
Determine_Conflict_Typeq
SummaryIDx
IDStart
Start
ProbID
stems
Strip_Text
field+
Command3_Click
PredID<
ResultText
temppJ
fieldasB
Strip_FileText=
Hiddene
Command1_Click
SystemTeo
SubOut
Number
Equals
Value
CheckError
LinkTimeout
Get_Succ_Relationships
RelType
LagType?
Get_Successor_Relationships~
bobl
date1*
date2Z
result2
result1%
total
text1
text2
Find_Conflict
PredStartq
SuccFinish
LogProblem
Conflict
ConType
Conflict_Type
Restraint
Log_Poss_Prob
Log_Def_Probe
ResultText_ChangeQ
Evaluate_Successors2
SummFinish
SumOutNum*
SummOutNum(
Summ}
SubFinish
Get_Successors
IDNum
hjgjkhg
SearchIDV
SubTaskIDU
ThenEvaluate_Successors
ThenSuccList(
ErrorHandler
Selecr3
MsgVal
MsgTxt
ActualSuccID%
DirList_Change!
FileList
DirlistI
ListCount
ThenFileListd
Listindexc
DriveList_Change{
DriveListT
Drive
Form_LinkOpen@
Cancel
Form_Load
NewPath@
FileList_Click4
FileList_PathChange
DirText_Change
LastChange
DIRTEXTCHANGE
DirList_Click
DIRLISTCLICK
DirText
FileListBox\
Filename
FileList_DblClick
OKBtn_Click
FoundIt
ColonPos
BslashPosj
StarPos
QueryPos
Bslash
LastOne
Pattern7
DirBox
SelStartV
SelLength@
Visible
Write_File
Filenum
WinprojPathC
Initialize
conflictingv
appID
msgID
Get_Preferences
IniFileNum
textline
ListSepz
DateOrder
DateForm
TimeForm
DateSep
TimeSep
AMTime
PMTime
AMText
PMTextJ
ViewName
FILETEXTCHANGE-
NAMETEXTCHANGE`
NameText
NameText_Change
Change]
PathForm
Unhideo
WindowState
handler;
handle
Frame1_DragDrop
Source
ThenAMText
SchedFromFinish
NumTasks+
getID
Finish
ConDate
openIni
Initializedd
OK_Btn_Clickx
masgbox7
OldDriveG
Label1_Click
Cancelled
Valid
Find_Latedate_Conflicts
through
tasks
evaluate
conflicts
cause+
constraints^
datesn
neither
relationship
correct
subtask
exists
Cleanup_and_ExitV
Cleanup_and
willp
manuallyg
Find_LateD@
windir
Log_Conflict
ConfType
DEFINITET
Field1L
Field2
POSSIBLE
Field3
Field4
sequence
breaks
LatedateForm
SetListSeparator
ViewFile
RestoreListSeparator
OK_Click
Screen
Width
Height(
Variable definitions. These are global to all procedures in the form..
Task ID from the Microsoft Project message
Unique ID of taskM
List of Unique ID Successors to SearchID
Unique ID of task in MS Project message
File handle number for LATEDATE.TXT file
Result that will be written to LATEDATE.TXT
Flags whether Initialize function was called
Indicates a cold DDE linka
Indicates a hot DDE link
Indicates no restraint on task
Indicates task has Actual Start date
Indicates task has Constraint of MFO,MSO,FNLT,or SNETh
Indicates task is a definite conflictM
Indicates task may be a conflict
Array of Unique Successor ID's
Array of task relationship types
Array of task relationship lead/lag amountso
Array of task relationship lead/lag unitst
Name of active project
Name of active viewe
Number of tasks in active projectp
Find_SubTask_Conflict
This subroutine looks for conflicts among the subtasks of IDNum$.e
If any of these subtasks are also summary tasks, Find_SubTask_Conflict()
is called recursively to check for more deeply nested conflicts.
Get outline number of summary task
,Outline Number)
Loop through all subtasks of IDNum$.
Subtask outline number.
Use the EditFind command to move to the subtask with this outlinem
number. If no task exists with this outline number, the selection
does not move.
EditFind .Field=[Outline Number],.Test=Equals,.Value="
Get Unique ID of current selection from Microsoft Project
Selection"
Get outline number of current selection
,Outline Number)
If the outline number of the selected task is the same ase
SubOutNum$, then the subtask exists.
Get Summary field of current taskt
,Summary)"
If this is another summary task, then check subtasks of this taska
Else check this task for a conflict.
Restraint% flags whether the successor task has a constraint,t
an Actual Start date, or neither. Conflict_Type returns
CONSTRAINED, STARTED, or NONE.
Lag is specified, so log it as a possible problem
Check this task for a conflict.p
Convert SS of subtask to serial number
,Scheduled Start)"
If the following condition is met, the task is ino
conflict. Log the problem as definite.
There are no more subtasks for this summary task.
Find_Succ_Conflict
This subroutine checks for conflicts in non-summary successor tasks
to SearchID$. PredStart# and PredFinish# are the start and finish dates/times of
SearchID$ (the predecessor task).F
Restraint% flags whether the successor task has a constraint, an Actual Starto
date, or neither. Conflict_Type returns CONSTRAINED, STARTED, or NONE.
This might be a conflicting task
If lag exists, then can only log
task as a possible conflict.
Else, check for definite conflict.
Get SS of successor task and convert to serial numberl
,Scheduled Start)"
Get SF of successor task and convert to serial number
,Scheduled Finish)
Check for the following conditions based on the task relationship for.
SuccID(n%). If the condition is true, then there is a definite conflict
with this successor task, so the problem is logged.
Evaluate_Successors
This subroutine gets the start and finish dates for SearchID$ and then calls
other subroutines which evaluate the successors of SearchID$ to determinel
which of them may cause conflicts.
Convert SS of SearchID$ to a serial number
,Scheduled Start)"
Convert SF of SearchID$ to a serial number
,Scheduled Finish)
Loop through the SuccID() array and check for conflicts.
,Summary)"
If successor is a summary task, look for conflicts among its subtaskss
Else look for conflict with successor task n%.
Get_Successors
Evaluates each successor relationship for SearchID$ and places values for:
Unique Successor ID
in SuccID
Relationship type
in RelTypeD
Lag amount
in Lag
Lag type (units)
in LagType
<- This value is not used in this sample
) but is provided for possible
) modifications.
Get list of successors to SearchID$
,Unique ID Successors)
Append a comma to the end of the list (if non-empty) for parsing
Loop while there are successors in the list
Save ID of first successor in list
Remove first successor from the list
Get successor ID only. Ignore relationship type, and lag/lead values.i
Relationship type is specified
Remove the ID string from Item$a
Get type (SS,FS,FF,SF) from Item$e
Lead/lag is specifiedS
Remove type string from Item$p
Get numeric lag amount
What is left must be the units (d, ed, %, etc.)t
Rel. type must be FS
Mark end of successor array
Conflict_Type
This function determines whether task IDNum$ may be a source ofa
conflict due to a Constraint or an Actual Start. It returns a value of
CONSTRAINED or STARTED if applicable, or NONE if it is not a possiblef
conflict.E
Get Actual Start date of IDNum$c
,Actual Start)
Task has started
Get Constraint.Type of IDNum$a
,Constraint Type)"
If Constraint Type is MSO, MFO, FNLT, or SNET then task is constrained
Finish No Later"
Start No Earlier
Initialize
This subroutine initializes DDE links to MS Project. It also sets required
Preferences and view information, as indicated.j
Use comma for DDE actions
SystemText will be the channel to the System topic in Projects
Winproj|System
ActiveProject"
Name of project with late date conflict.
ActiveView
Save the current view.
FileText will be the channel to the active project
Winproj|
Initialize necessary preferences. (Date/time formats, etc.)c
Suspend error handling
Error .Halt=No
Turn off MS Project alert messages
OptionsPreferences .DateOrder=0"
OptionsPreferences .DateFormat=0
OptionsPreferences .12HourTimeFormat=0
OptionsPreferences .DateSeparator=/"
OptionsPreferences .TimeSeparator=:"
OptionsPreferences .AMText=AM"
OptionsPreferences .PMText=PM"
Display Task Sheet
View [Task Sheet] .SinglePane=[Yes]"
ActiveView
Check current view
Task Sheet
Task Sheet does not existt
This macro requires the Task Sheet to run. Please create the Task Sheet or open BACKUP.MPV and runn this macro again."
Task Sheet Error
Exit app
Set filter to ensure all tasks are displayed
Filter [All Tasks]
NumLines
Number of tasks in project
This section opens the log file LATEDATE.TXT and logs the date and time.
windir
\LATEDATE.TXT"
**********
mm-dd-yyyy h:mm am/pm"
**********
Find_Latedate_Conflicts
This is the main subroutine for this application. It gets the task ID
from the user, then calls other subroutines to check possible conflicts
with successors to the task.
Loop until a valid ID is entered or the Cancel button is pressed
in the dialog box.
Get task ID# specified in "Late date..." message from user
Enter ID number from Microsoft Project message:"
Conflict Finder"
If Cancel button was pressed, or ID# is blank, then exit program
If an invalid ID# is entered, tell user and repeat InputBoxo
There is no task with this ID.
ID Error
Move to task specified and get its Unique ID numberr
EditGoto .ID="
Selection"
SearchID$ will be the Unique ID of the task that
is being checked for successor conflicts. It is
initially the task referenced in the MS Projectt
message, but may also be summary tasks thatI
contain the initial task.s
Get outline# of task. This will be used to identify its summary tasks.
,Outline Number)
Check for self-contained conflict. If the Actual Start of the task is.
in conflict with the constraint on the task, it will generate the "Late
date..." message.a
,Constraint Date)"
Constraint is not ASAP.
Save the constraint date/time as a serial number
Save the Sched Finish date/time as a serial number
,Scheduled Finish)
,Constraint Type)"
If the Constraint Type is MFO or FNLT, then check for conflicting dates
Must Finish"
Finish No Later"
If Scheduled Finish > Constaint Date then log problemF
*** Task "
has an Actual Start
date that does not allow it to finish by
its constraint date."u
Loop until all summary tasks of ID$ have been evaluated
Set up list of successor relationships
If SearchID$ has at least 1 successor, it will have been placed in the
SuccID() array. If at least one successor is present, then evaluate for
conflicts.
SearchID$ has a summary task
This loop finds the outermostD
level of the outline number.
This is the outline number of the summary task.
Move to first task in MS Project.s
SelectBeginning"
Use the EditFind command to move to the summary task
EditFind .Field=[Outline Number],.Test=Equals,.Value="
Unique ID of summary task becomes new SearchID$E
Selection"
SearchID$ has no summaries.
No conflicts found."
No problems were found.
Log this in text file.
Close log file.s
Start Notepad with log file open for viewing.w
windir
\notepad.exe "
LATEDATE.TXT
Cleanup_and_Exit
This subroutine resets the view and exits LATEDATE.EXE.n
It can be modified to reset Preferences for date/timeE
formats.
Reset user's original view
View .Name=[
If you want to reset the date/time preferences before exiting thes
program, set the values of the following commands to the formats
you want and remove the apostrophes at the beginning of the commentm
lines:
SystemText.LinkExecute "OptionsPreferences .DateOrder="
SystemText.LinkExecute "OptionsPreferences .DateFormat="
SystemText.LinkExecute "OptionsPreferences .12HourTimeFormat="t
SystemText.LinkExecute "OptionsPreferences .DateSeparator="
SystemText.LinkExecute "OptionsPreferences .TimeSeparator="
SystemText.LinkExecute "OptionsPreferences .AMText="r
SystemText.LinkExecute "OptionsPreferences .PMText="r
SystemText.LinkExecute "OptionsPreferences .ListSeparator="
Restore Microsoft Project list separator
Remove form from memory
Log_Conflict
This subroutine logs the conflict in the text file LATEDATE.TXT in the
Windows directory. Definite task conflicts are prefaced with '***';m
possible conflicts are not..
CR/LF sequence for line breaks
*** Task "
Definite conflicts marked with ***
which
conflicts with the "
Task "
Possible conflicts are not
which
may conflict with the
Field2=Field1 if SearchID$<>summary
SearchID$ is a summary taskr
Field2 = summary task ID
is contained in summary task
Task "
ID of actual successor tasks
Successor is a summary task
summary task "
task "
has a "
relationship with "
Task is constrainedn
constraint on task "
Task has started
Actual Start of task "
Conflict caused by subtask
(a subtask of task "
SetListSeparator
Copy the list separator character from Microsoft Project,
and replace it with a comma. This is necessary so that
' LinkRequest statements are understood by Microsoft Project.
This subroutine should be called before any LinkRequests
are performed, and should always be paired with a subsequent
call to RestoreListSeparator.
No Clipboard operations should be made between these twou
calls, since the list separator is held there.
WINPROJ|System
AppExecute
Prepare MS Project to accept SendKeys
{F10}op{PGDN 4}{F2}{HOME}+{RIGHT}^c{ESCAPE 2}"
AppMinimize"
Minimize Microsoft Project
OptionsPreferences .ListSeparator=[,]"
RestoreListSeparator
Restore the list separator character in Microsoft Project
from the Clipboard. SetListSeparator should be called before
calling RestoreListSeparator.
See SetListSeparator for more information.l
WINPROJ|System
AppExecute
Prepare MS Project to accept SendKeys
{F10}op{PGDN 4}{F2}{HOME}+{RIGHT}^v{ENTER 2}
AppMinimize"
Minimize Microsoft Project
OK_Click
The user is ready to continue and find task conflicts.
Look for conflicts
Form_Load
This is the first subroutine to execute when LATEDATE.EXE is activated.
It establishes a global error handler and calls the Initialize
subroutine.h
Center form horizontally
Center form vertically
Errors not captured elsewhere go here
No conflicts found."
Log text if no conflicts are found.t
Initiate DDE links and set MS Project environments
Line #
, Error #"
Exit app