I have a workbook with several worksheets that exist constantly, which are constantly being cleaned, updated, etc. Since they are mentioned in different routines, I made each corresponding object of the working table of a pseudoglobal variable in the following way, for example, for the main sheet:
Function MAIN() As Worksheet
Set MAIN = ThisWorkbook.Sheets("Main")
End Function
This way, I can refer to each sheet in other routines, for example:
MAIN.Cells.ClearContents
I also defined some pseudoglobal constants that are located in a fixed place on the "main" sheet in a similar way, for example:
Function NumLines() As Integer
NumLines = MAIN.Range("C3").Value
End Function
, "NumLines" , .
, , , , ?