OneAbhishek
New Member
- Joined
- Feb 23, 2022
- Messages
- 5
- Office Version
- 2016
- Platform
- Windows
Hi everyone i am working in this sheet where i have to copy data from one sheet named as "DAILY" and paste to next available row in column "B" in another sheet named as DATABASE2". i tried following vba code i want to assign this macro to a linked picture. i hope i will get lucky and someone will help me too
It shows object error
Sub Save1()
' SAVE1 Macro
'
'
ActiveSheet.Range("$A$9:$H$80").AutoFilter Field:=3, Criterial:="<>"
Range("B10:I80").SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("DATABASE2").Select
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 2).End(xlUp)
ActiveCell.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("DAILY").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("I17").Select
End Sub
It shows object error
Sub Save1()
' SAVE1 Macro
'
'
ActiveSheet.Range("$A$9:$H$80").AutoFilter Field:=3, Criterial:="<>"
Range("B10:I80").SpecialCells(xlCellTypeVisible).Select
Selection.Copy
Sheets("DATABASE2").Select
Dim Lastrow As Long
Lastrow = Cells(Rows.Count, 2).End(xlUp)
ActiveCell.End(xlDown).Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("DAILY").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = ""
Range("I17").Select
End Sub