Code:
Dim Rng As Range
Dim rngCell As Range
Dim LastRow As Long
Dim LastColumn As Long
Dim thisMonth As Long
Dim thisYear As Long
Dim wBk1 As Workbook
Dim wBk2 As Workbook
Dim xRg As Range
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim ws3 As Worksheet
Dim ws4 As Worksheet
Dim ws5 As Worksheet
thisMonth = Month(Date)
thisYear = Year(Date)
Set wBk1 = Workbooks("Macros.xlsm")
Set wBk2 = Workbooks("Client " & MonthName(thisMonth) & " " & thisYear & ".xlsx")
Set ws1 = wBk2.Sheets(1)
Set ws2 = wBk1.Sheets(2)
Set ws3 = wBk1.Sheets(3)
Set ws4 = wBk2.Sheets(2)
Set ws5 = wBk2.Sheets(3)
Dim rngAddress1 As Range, rngAddress2 As Range, rngAddress3 As Range, rngAddress4 As Range, rngAddress5 As Range
Dim rngAddress6 As Range, rngAddress7 As Range, rngAddress8 As Range, rngAddress9 As Range, rngAddress10 As Range
Dim rngAddress11 As Range, rngAddress12 As Range, rngAddress13 As Range, rngAddress14 As Range, rngAddress15 As Range
Dim rngAddress16 As Range, rngAddress17 As Range, rngAddress18 As Range, rngAddress19 As Range, rngAddress20 As Range
I have the above written to several modules. I'd like to just simply create a global setting for all these so I don't have to keep writing them over and over (Ok, copy/paste). I keep a notepad sheet open to track them at all times as well.
Problem is, when I tried creating them as global and global const under an Option Explicit, it kept giving me issues with the Set ... 's.
Plus, if I run any macro and put something like set ThisMonth .... it fails and says it requires an object. This tells me that the global variables are not passing.
Any help would be appreciated.