Ok, So I have a lot going on in this workbook and just trying to clean up all the script etc in this workbook and wanted to know if it is possible to declare everything below ALONG WITH Setting everything so when I get to the codes I dont have to "Set" anything just use the code like "Ls.Activate" or whatever
Here is everything I want made available across all modules
Here is everything I want made available across all modules
Code:
Public Wb As WorkbookPublic df As Workbook ' Defined in Script
Public Pd As Workbook ' Defined in Script
Public mf As Workbook ' Defined in Script
Public Wbk As Workbook ' Defined in Script
Public Ws As Worksheet
Public Ls As Worksheet
Public Fl As Worksheet
Public Ps As Worksheet
Public Es As Worksheet
Public SOS As Worksheet
Public Piv As Worksheet
Public Inst As Worksheet
Public ds As Worksheet ' Defined in Script
Public Pds As Worksheet ' Defined in Script
Public ms As Worksheet ' Defined in Script
Public Nws As Worksheet 'Defined in Script
Public RDPiv As Worksheet ' Defined in Script
Public TT As ListObject
Public PDPT As ListObject
Public PDT As ListObject 'Defined in Script
Public SOST As ListObject ' Defined in Script
Public SOSDT As ListObject
Public LT As ListObject
Public IPCB As CheckBox
Public SOSCB As CheckBox
Public LPCB As CheckBox
Public RFCB As CheckBox
Public ASCB As CheckBox
Public SAPCB As CheckBox
Public SOSRunCB As CheckBox
Public JDARunCB As CheckBox
Public PDRunCB As CheckBox
Public PLWSRunCB As CheckBox
Public ExPRunCB As CheckBox
Public ASRunCB As CheckBox
Public SAPRunCB As CheckBox
Set Wb = ThisWorkbook
Set Ws = Wb.Sheets("Today")
Set Ls = Wb.Sheets("L.W.S.")
Set Fl = Wb.Sheets("File Locs")
Set Ps = Wb.Sheets("Prev Day")
Set Es = Wb.Sheets("E-mail")
Set SOS = Wb.Sheets("SOS")
Set Piv = Wb.Sheets("Pivot")
Set Inst = Wb.Sheets("Instruction Sheet")
Set PDT = Ps.ListObjects("PD_Table")
Set TT = Ws.ListObjects("TodayTable")
Set SOSDT = SOS.ListObjects("SOSDT")
Set LT = Ls.ListObjects("LotTable")
Set IPCB = Fl.Shapes("IPCB").OLEFormat.Object
Set SOSCB = Fl.Shapes("SOSCB").OLEFormat.Object
Set LPCB = Ws.Shapes("LPCB").OLEFormat.Object
Set RFCB = Fl.Shapes("RFCB").OLEFormat.Object
Set ASCB = Fl.Shapes("ASCB").OLEFormat.Object
Set SAPCB = Fl.Shapes("SAPCB").OLEFormat.Object
Set SOSRunCB = Ws.Shapes("SOSRunCB").OLEFormat.Object
Set JDARunCB = Ws.Shapes("JDARunCB").OLEFormat.Object
Set PDRunCB = Ws.Shapes("PDRunCB").OLEFormat.Object
Set PLWSRunCB = Ws.Shapes("PLWSRunCB").OLEFormat.Object
Set ExPRunCB = Ws.Shapes("ExPRunCB").OLEFormat.Object
Set ASRunCB = Ws.Shapes("ASRunCB").OLEFormat.Object
Set SAPRunCB = Ws.Shapes("SAPRunCB").OLEFormat.Object