home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / project / msproj5.cab / EXAMPLES / TIMETRAK / GLOBAL.BAS next >
Encoding:
BASIC Source File  |  1994-03-25  |  10.0 KB  |  195 lines

  1. '  GLOBAL.BAS  - This file contains all global constants, variables,
  2. 'and localizable strings used in the Timesheet application.
  3. '
  4. '
  5.  
  6. '  ***** LOCALIZABLE STRINGS *****
  7. '
  8. '  Strings - All message box text and titles are declared in this
  9. 'section as global constants.
  10. '
  11. Global Const MB_CANNOT_CREATE_OBJECT = "Cannot create Microsoft Project object.  Check that you are running Microsoft Project version 4.0 or later."
  12. Global Const MB_PROJ_NOT_RUNNING = "Microsoft Project is not currently running.  Please start Microsoft Project and then run Timesheet."
  13. Global Const MB_TIMESHEET = "Microsoft Project Timesheet"
  14. Global Const MB_NO_RESOURCES = "The active project does not contain any resources.  Timesheet cannot be used with a project that does not contain resources."
  15. Global Const MB_NO_TASKS = "The active project does not contain any tasks.  Timesheet cannot be used with a project that does not contain tasks."
  16. Global Const MB_NO_ASSIGNED_RESOURCES = "None of the resources is assigned to a task during the specified date range."
  17. Global Const MB_NO_OPEN_PROJECTS = "You must open a project file before using Timesheet."
  18. Global Const MB_NO_RES_SELECTION = "You must select a resource from the Resources list."
  19. Global Const MB_FROMDATE = "The date entered in the ""From"" field is not a valid date format."
  20. Global Const MB_TODATE = "The date entered in the ""To"" field is not a valid date format."
  21. Global Const MB_BAD_DATE_ORDER = "The ""From"" date must be earlier than the ""To"" date."
  22. Global Const MB_NO_VALID_ASSIGNMENTS = "The selected resource does not have any task assignments within the specified date range."
  23. Global Const MB_GENERIC_ERROR = "An error has occured which will force Timesheet to terminate.  Please verify that Microsoft Project is currently running, then restart Timesheet."
  24. Global Const MB_UNRECOGNIZED_ENTRY = "Work not valid."
  25. Global Const MB_LESS_THAN_ZERO = "You must enter a value that is greater than or equal to Zero."
  26. Global Const MB_BAD_DATE_FORMAT = "The date you entered is not in a recognized date format."
  27. Global Const MB_BAD_DATE_RANGE = "The specified date range is outside the dates for the active project."
  28. Global Const MB_START_NOT_VALID = "Task start date is before the project start date."
  29. Global Const MB_FINISH_NOT_VALID = "Task finish date is before the task start date."
  30. Global Const MB_BAD_ASOF_DATE = "The ""As Of"" date is invalid. Make sure you have entered a valid date."
  31. Global Const MB_PREVINSTANCE = "A copy of Microsoft Project Timesheet is already active."
  32. Global Const MB_CONSOLIDATED_PROJECT = "The current active project is a consolidated project.  Timesheet does not support consolidated projects; please run Timesheet individually on each project."
  33. Global Const MB_RES_SHARING = "The current active project is sharing resources from another project file.  Timesheet does not support resource-sharing projects."
  34. Global Const MB_NO_TASK_VIEW = "Timesheet is unable to change the active view to a task view.  The active view must be a task-oriented view, such as the Gantt Chart or PERT Chart.  Please change to a task view and restart Timesheet."
  35. Global Const MB_AUTOTRACK = "Timesheet has deselected the ""Updating Task Status Updates Resource Status"" option under the Schedule tab in the Tools, Options dialog.  If you intend to continue using Timesheet, this option should not be selected, because it may cause you to lose changes made using Timesheet."
  36.  
  37. Global Const CAP_FRM_OPTIONS = "Resource Update Options"    'Caption for frmOptions
  38. Global Const CAP_FRM_TINFO = "Update Resource Work"         'Initial caption for frmTInfo
  39. Global Const CAP_SPLASH1 = "Microsoft Project Timesheet"    'first line of splash screen caption
  40. Global Const CAP_SPLASH2 = "Please wait..."                 'second line of splash screen caption
  41.  
  42. Global Const PROG_INIT = "Initializing Timesheet"
  43. Global Const PROG_FORMLOAD = "Loading forms"
  44. Global Const PROG_RESASSIGN = "Checking resource assignments"
  45. Global Const PROG_DONE = "Done!"
  46.  
  47. '  Duration unit string constants.
  48. Global Const DUR_MINUTES = "m"      ' minutes
  49. Global Const DUR_HOURS = "h"        ' hours
  50. Global Const DUR_DAYS = "d"         ' days
  51. Global Const DUR_WEEKS = "w"        ' weeks
  52. Global Const EDUR_MINUTES = "em"    ' elapsed minutes
  53. Global Const EDUR_HOURS = "eh"      ' elapsed hours
  54. Global Const EDUR_DAYS = "ed"       ' elapsed days
  55. Global Const EDUR_WEEKS = "ew"      ' elapsed weeks
  56.  
  57. '  Grid column titles
  58. Global Const GRID_TASKID = "ID"                  'Task ID
  59. Global Const GRID_TASKNAME = "Task Name"         'Task Name
  60. Global Const GRID_ACTWORK = "Act. Work"          'Actual Work for the resource
  61. Global Const GRID_REMWORK = "Rem. Work"          'Remaining Work for the resource
  62. Global Const GRID_ADDWORK = "Hours Worked"       'Additional work to apply to the task
  63. Global Const GRID_ETC = "New Rem. Work"          'The new estimated amount of work needed to complete the task
  64. Global Const GRID_START = "Start Date"           'Date that the resource started work on the task
  65. Global Const GRID_FINISH = "Finish Date"         'Date that the resource finished work on the task
  66.  
  67. '  View names
  68. Global Const GANTT_CHART = "Gantt Chart"
  69. Global Const PERT_CHART = "PERT Chart"
  70. Global Const TASK_SHEET = "Task Sheet"
  71. Global Const TASK_PERT = "Task PERT"
  72.  
  73. '  ***** END LOCALIZABLE STRINGS *****
  74.  
  75. '  Global variable declarations
  76. Global goProjApp As object          'The MSProject.Application object
  77. Global goActiveProj As object       'The ActiveProject object
  78. Global gdtDefStartTime As Variant   'The default start time for tasks
  79. Global gdtDefFinishTime As Variant  'Equal to default start + default hrs. per day
  80. Global gdtDefStartDate As Variant   'The project start date
  81. Global gdtDefFinishDate As Variant  'The project finish date
  82. Global gsTimeSep As String          'The time separator character.
  83. Global gdtTodaysDate As Variant     'Today's date
  84. Global gdtCurrentDate As Variant    'Current date from the active project
  85. Global gdtAsOfDate As Variant       ' "As Of" date used in TInfo form
  86. Global gbDbg As Integer             'Flag that indicates that debug info should be written to a file.  Set True with the command-line switch /d.
  87. Global gbDbgFile As Integer         'File number of the debug file.
  88. Global gbDTIF As Integer            'Error flag
  89. Global gsDefWorkUnit As String      'The default work units character.
  90. Global gsDefDurUnit As String       'The default duration units character.
  91. Global gnDefWorkUnit As Integer     'Integer that project uses to identify the default work unit.
  92. Global gnDefDurUnit As Integer      'Integer that project uses to identify the default duration unit.
  93. Global gbSchedMsg As Integer        'Flag used to indicate that scheduling messages were turned off by Timesheet.
  94. Global gsOrigView As String         'Name of the view that was originally set when TimeTrak was first run.
  95.  
  96. '  Constants used by Timesheet.
  97.  
  98. '  Microsoft Project Visual Basic constants.  These constants are in the
  99. 'same format as Proj's built-in Visual Basic for Applications constants.
  100. '  DurationFormat constants
  101. Global Const pjMinutes = 0
  102. Global Const pjHours = 1
  103. Global Const pjDays = 2
  104. Global Const pjWeeks = 3
  105. Global Const pjElapsedMinutes = 4
  106. Global Const pjElapsedHours = 5
  107. Global Const pjElapsedDays = 6
  108. Global Const pjElapsedWeeks = 7
  109.  
  110. '  Grid fields
  111. Global Const AUID = 0
  112. Global Const TASKID = 1
  113. Global Const TASKNAME = 2
  114. Global Const ACTWORK = 3
  115. Global Const REMWORK = 4
  116. Global Const ADDWORK = 5
  117. Global Const ETC = 6
  118. Global Const START = 7
  119. Global Const FINISH = 8
  120.  
  121. '  SetView constants
  122. Global Const SET_VIEW = 1
  123. Global Const RESTORE_VIEW = 2
  124.  
  125. '  FindWindow window class constant
  126. Global Const FW_WINPROJ = "JWinproj-WhimperMainClass"
  127.  
  128. '  Resource-selection
  129. Global Const ALL_RESOURCES = -32768
  130.  
  131. '  User-defined error codes
  132. Global Const ERR_EMPTY_INDEX = 32767
  133. Global Const ERR_INVALID_INDEX = 32766
  134. Global Const ERR_NO_APP_OBJECT = 32765
  135. Global Const ERR_NO_RES_SELECTION = 32764
  136. Global Const ERR_BAD_PARAM = 32763
  137. Global Const ERR_FROMDATE = 32762
  138. Global Const ERR_TODATE = 32761
  139. Global Const ERR_BAD_DATE_ORDER = 32760
  140. Global Const ERR_EOL = 32759
  141. Global Const ERR_BOL = 32758
  142. Global Const ERR_BAD_DATE_RANGE = 32757
  143. Global Const ERR_POOL = 32756
  144.  
  145. ' Show parameters
  146. Global Const MODAL = 1
  147. Global Const MODELESS = 0
  148.  
  149. ' Function Parameters
  150. ' MsgBox parameters
  151. Global Const MB_OK = 0                 ' OK button only
  152. Global Const MB_OKCANCEL = 1           ' OK and Cancel buttons
  153. Global Const MB_ABORTRETRYIGNORE = 2   ' Abort, Retry, and Ignore buttons
  154. Global Const MB_YESNOCANCEL = 3        ' Yes, No, and Cancel buttons
  155. Global Const MB_YESNO = 4              ' Yes and No buttons
  156. Global Const MB_RETRYCANCEL = 5        ' Retry and Cancel buttons
  157.  
  158. Global Const MB_ICONSTOP = 16          ' Critical message
  159. Global Const MB_ICONQUESTION = 32      ' Warning query
  160. Global Const MB_ICONEXCLAMATION = 48   ' Warning message
  161. Global Const MB_ICONINFORMATION = 64   ' Information message
  162.  
  163. Global Const MB_APPLMODAL = 0          ' Application Modal Message Box
  164. Global Const MB_DEFBUTTON1 = 0         ' First button is default
  165. Global Const MB_DEFBUTTON2 = 256       ' Second button is default
  166. Global Const MB_DEFBUTTON3 = 512       ' Third button is default
  167. Global Const MB_SYSTEMMODAL = 4096      'System Modal
  168.  
  169. ' MsgBox return values
  170. Global Const IDOK = 1                  ' OK button pressed
  171. Global Const IDCANCEL = 2              ' Cancel button pressed
  172. Global Const IDABORT = 3               ' Abort button pressed
  173. Global Const IDRETRY = 4               ' Retry button pressed
  174. Global Const IDIGNORE = 5              ' Ignore button pressed
  175. Global Const IDYES = 6                 ' Yes button pressed
  176. Global Const IDNO = 7                  ' No button pressed
  177.  
  178. '  MousePointer
  179. Global Const DEFAULT = 0        ' 0 - Default
  180. Global Const HOURGLASS = 11     ' 11 - Hourglass
  181.  
  182. ' Variant VarType tags
  183. Global Const V_EMPTY = 0
  184. Global Const V_NULL = 1
  185. Global Const V_INTEGER = 2
  186. Global Const V_LONG = 3
  187. Global Const V_SINGLE = 4
  188. Global Const V_DOUBLE = 5
  189. Global Const V_CURRENCY = 6
  190. Global Const V_DATE = 7
  191. Global Const V_STRING = 8
  192.  
  193.  
  194.  
  195.