hi,
i am a new user of module in excel.
When i run the following code i get the "Type mismatch" error dialogue box. It was running fine a few hours ago.
What is amusing is that it sometimes give the "Application or object-defined" error dialogue box as well.
What shall i do to resolve this? And, what could be causing 2 different error dialogue boxes for the same code?
Sub addvalues()
For i = 2 To Worksheets.Count
For j = 12 To 87
For k = 6 To 20
Worksheets(1).cells(j, k) = Worksheets(1).cells(j, k) + Worksheets(i).cells(j, k)
Next k
Next j
Next i
End Sub
Bookmarks