Hi there,
Would anyone be able to tell me why everytime I execute this bit of code I get an overflow error?
When I debug it always shows the value of i being 1 more than the starting row value. Ie. if inital row is 2, then the value of i at the point of error in the code is i=3.
Thanks,
Code
Sub pastevalues()
Dim C As Range
Dim i As Long
Dim diag As New ProgressDialogue
diag.Configure "Executing Code", "Executing Code...", Range("B2").Row, Range("B262144").Row
diag.Show
For Each C In Range("b2:b262144").Cells
For i = Range("B2").Row To Range("B262144").Row
diag.SetValue i
diag.SetStatus "Executing Code..." & i
If diag.cancelIsPressed Then Exit For
Next i
C.value = C.value
Next
diag.Hide
MsgBox "Process Complete"
End Sub
Display More