DiseaseWorksheetManager
Internal members (not exported)
Commands
RemoveWorksheet #
Remove the specified worksheet using guarded Application settings.
Signature:
Public Function RemoveWorksheet(ByVal workbook As Workbook, ByVal sheetName As String) As Boolean
Parameters:
workbook: Workbook hosting the worksheet collection.sheetName: String worksheet name to delete.
Returns: Boolean True when the worksheet existed and has been removed.
Queries
WorksheetExists #
Test whether a worksheet exists within the workbook.
Signature:
Public Function WorksheetExists(ByVal workbook As Workbook, ByVal sheetName As String) As Boolean
Parameters:
workbook: Workbook hosting the worksheet collection.sheetName: String worksheet name to locate.
Returns: Boolean True when the worksheet exists.
Internal Helpers
ValidateWorkbook #
Ensure the workbook reference is valid.
Signature:
Private Sub ValidateWorkbook(ByVal workbook As Workbook)
ValidateSheetName #
Ensure the worksheet name is not empty.
Signature:
Private Sub ValidateSheetName(ByVal sheetName As String)
FindWorksheet #
Locate the worksheet by name using case-insensitive comparison.
Signature:
Private Function FindWorksheet(ByVal workbook As Workbook, ByVal sheetName As String) As Worksheet
CreateGuard #
Instantiate and activate an Application guard.
Signature:
Private Function CreateGuard(ByVal excelApp As Application) As IDiseaseApplicationState
ErrorHandling
ThrowError #
Centralised error raising aligned with ProjectError codes.
Signature:
Private Sub ThrowError(ByVal errNumber As ProjectError, ByVal errMessage As String)