Good Morning, Anyone can help me to solve my problem on the autofill step? I have error encounter which is the range(x). Anyone know the correct code for it? Thanks Thanks.
Private Sub CommandButton4_Click()
Dim x As Integer
Sheets("WB Summary").Select
x = Cells(2, Cells(2, Columns.Count).End(xlToLeft).Column).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.AutoFill Destination:=Range(x), Type:=xlFillDefault
End Sub
Bookmarks