Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '
- ' Description: This module holds declarations for global constants,
- ' variables, type structures, and DLLs.
- '
- ' Authors: Rob Bovey, www.appspro.com
- ' Stephen Bullen, www.oaltd.co.uk
- '
- ' Chapter Change Overview
- ' Ch# Comment
- ' --------------------------------------------------------------
- ' 05 Initial version
- '
- Option Explicit
- Option Private Module
- ' **************************************************************
- ' Global Constant Declarations Follow
- ' **************************************************************
- ' Application identification constants.
- Public Const gsAPP_NAME As String = "PETRAS Time Sheet" ' Name of the application.
- Public Const gsVERSION As String = "1.0" ' Application version number.
- Public Const gsBUILD As String = ".003" ' Application build number.
- ' CommandBar name constants.
- Public Const gsBAR_TOOLBAR As String = "PETRAS Toolbar"
- ' Filename constants.
- Public Const gsFILE_TIME_ENTRY As String = "PetrasTemplate.xls"
- ' PetrasTemplate.xls worksheet CodeName constants.
- Public Const gsSHEET_TIME_ENTRY As String = "wksTimeEntry"
- ' ThisWorkbook wksUISettings range name constants.
- Public Const gsRNG_NAME_LIST As String = "tblRangeNames"
- ' PetrasTemplate.xls wksTimeEntry range name constants.
- Public Const gsRNG_SET_HIDE_COLS As String = "setHideCols"
- Public Const gsRNG_SET_SCROLL_AREA As String = "setScrollArea"
- Public Const gsRNG_HAS_ERRORS As String = "errHasErrors"
- Public Const gsRNG_INSERT_ROW As String = "ptrInsertRow"
- Public Const gsRNG_EMPLOYEE_NAME As String = "inpEmployee"
- Public Const gsRNG_WEEK_END_DATE As String = "inpWeekEnding"
- ' Error message constants.
- Public Const gsERR_FILE_NOT_FOUND As String = "The PetrasTemplate.xls workbook could not be located."
- Public Const gsERR_DATA_ENTRY As String = "There are data entry errors on the time sheet. Please fix them before posting it."
- ' User message constants.
- Public Const gsMSG_BOOK_NOT_ACTIVE As String = "The PetrasTemplate.xls workbook must be active before this command can be used."
- Public Const gsMSG_POST_SUCCESS As String = "The time entry workbook was successfully posted."
- Public Const gsMSG_POST_FAIL As String = "The time entry workbook could not be posted."
- ' Status bar constants.
- Public Const gsSTATUS_LOADING_APP As String = "Loading application, please wait..."
- ' Dialog caption constants.
- Public Const gsCAPTION_SELECT_FOLDER As String = "Select Your Consolidation Folder"
- ' Registry setting constants.
- Public Const gsREG_APP As String = "Professional Excel Development\Petras Reporting"
- Public Const gsREG_SECTION As String = "Settings"
- Public Const gsREG_KEY As String = "ConsolidationPath"
- ' **************************************************************
- ' Global Variable Declarations Follow
- ' **************************************************************
- Public gbShutdownInProgress As Boolean ' Used to ensure that the app shutdown code doesn't get called more than once.
- Public gsAppDir As String ' Application directory
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
- ' Comments: This routine initializes all global variables.
- '
- ' Arguments: None
- '
- ' Date Developer Chap Action
- ' --------------------------------------------------------------
- ' 06/01/08 Rob Bovey Ch05 Initial version
- '
- Public Sub InitGlobals()
- ' Get the application directory.
- gsAppDir = ThisWorkbook.Path
- If Right$(gsAppDir, 1) <> "\" Then gsAppDir = gsAppDir & "\"
- ' Initialize global variables.
- gbShutdownInProgress = False
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement