Re: VBA runtime error '6': Overflow
I'm having a similar issue to this and was hoping to get some assistance. I am also receiving a run-time error 6 Overflow error and can't identify what's causing this. Below is my code:
Code
Dim SheetLastRow As Long
Dim SheetLastcolumn As Byte
Dim RecentMonth, ii As Long
Dim OldMonth, iii As Long
Dim ExceptionHolder, iiii As Long
Dim Dict As Scripting.Dictionary
Dim RowHolder As Long
Dim wb As String
Dim myArray As Variant
myArray = Array(4, 14, 16) ' Enter column numbers we're interested in evaluating between the two months
ReDim ExceptionHolder(1 To 1, 1 To 3)
wb = ActiveWorkbook.Name
Set Dict = New Scripting.Dictionary
SheetLastRow = Workbooks(wb).Sheets("Full File July").Range("A60000").End(xlUp).Row
SheetLastcolumn = Workbooks(wb).Sheets("Full File July").Range("SZ12").End(xlToLeft).Column
RecentMonth = Workbooks(wb).Sheets("Full File July").Range(Cells(12, 1), Cells(SheetLastRow, SheetLastcolumn)).Value
Display More
The line RecentMonth = Workbooks(wb).Sheets("Full File July").Range(Cells(12, 1), Cells(SheetLastRow, SheetLastcolumn)).Value is what is causing the error. There are only 21 columns in the sheet so I don't think the Byte assignment should be an issue(?) Any insights would be much appreciated!