I\'m refactoring a number of modules in an Excel 2003 workbook and the same set of worksheets are declared in each procedure in each module; I\'d like to just declare them o
'1. Insert a module
'2. Declare worksheet public variable in the module as follows
Public xlwkGSModel As Worksheet
'3. Instantiate this public variable in the application load event
Sub Workbook_Open()
Set xlwkGSModel = ActiveWorkbook.Worksheets("gs_model")
End Sub
'Now you can refer the gs_model worksheet with the xlwkGSModel variable
'For example
dim x as string
x = xlwkGSModel.Cells(1,1)