VBA Autofill feature

  • I have the following vba code that I am trying to use to no avail. I need to run an autofill macro that will not refer to any range unless it is a variable.

    Code
    lnglastrow = ActiveSheet.UsedRange.Rows.Count


    Code
    ActiveCell.Offset(2, 0).AutoFill Range(ActiveCell.Offset(2, 0), ActiveCell.Offset(2, 3).lnglastrow)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!