With this macro, why an I getting an error message that my variable 'mr' is
not defined? Isn't 'mr = ActiveCell.Row' my defining statement?
Sub MoveQuota()
mr = ActiveCell.Row
Range (Cells(mr, "c").Copy(mr, "d"))
Cells(mr, "c").Select
Selection.ClearContents
Cells(mr, "e").Select
Selection.ClearContents
End Sub
Thanks,
Barney
Tyro - 24 Feb 2008 20:37 GMT
If you have Option Explicit on, and it sounds like you do, you must define
every varible before use such as:
Dim mr as long
Using Option Explicit is good programming practice.
Tyro
> With this macro, why an I getting an error message that my variable 'mr'
> is not defined? Isn't 'mr = ActiveCell.Row' my defining statement?
[quoted text clipped - 11 lines]
>
> Barney