Quantcast
Channel: VBForums - Visual Basic 6 and Earlier
Viewing all articles
Browse latest Browse all 21089

Autofill

$
0
0
Hi Al,

Could you please help to tell me what is wrong in this code?
I would like to use autofill on a sheet, where only the first column contains function.

Code:

ActiveWorkbook.Sheets("Numbers").Select
    ActiveSheet.Unprotect (password)
    element = Range("A3").End(xlDown).Row
    Range("A3:A" & element).Select
    Range("A3").Select
    Range(Selection, Selection.End(xlToRight)).Select
    Selection.AutoFill Destination:=Range("A3:A" & element), Type:=xlFillDefault
    Range("A3").Select
    ActiveSheet.Protect (password), DrawingObjects:=True, Contents:=True, Scenarios:=True

Thanks a lot

Viewing all articles
Browse latest Browse all 21089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>