Overflow error 6

Raj B 1 Reputation point
2022-01-10T09:34:04.757+00:00

the code below is giving overflow error 6 - Excel VBA

Dim LR As Long 'LR = Last Row'
Dim kSum As Long 'Sum of Column K'

Workbooks("T12 - Business_turnover.xlsx").Worksheets("T12 - Business_turnover").Activate

LR = Cells(Rows.Count, 11).End(xlUp).Row
MsgBox LR

kSum = CLng(Application.WorksheetFunction.Sum(Range("K2:K" & LR)))

MsgBox kSum

Developer technologies Visual Basic for Applications
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.