Muhammad Rizwan
New Member
- Joined
- Jan 17, 2022
- Messages
- 3
- Office Version
- 2016
- 2013
- 2011
- 2010
- 2007
- 2003 or older
- Platform
- Windows
Hello Experts
I am using vba code to copy only tick books, its done
but i want to copy invoice number etc. can some one write code for me how to copy invoice number till empty row in sales sheet
Copy Code is here
Sub CopyRows()
For Each chkbx In ActiveSheet.CheckBoxes
If chkbx.Value = 1 Then
For r = 13 To Rows.Count
If Cells(r, 1).Top = chkbx.Top Then
With Worksheets("sales")
LRow = .Range("e" & Rows.Count).End(xlUp).Row + 1
.Range("e" & LRow & ":i" & LRow) = _
Worksheets("Invoice").Range("c" & r & ":g" & r).Value
End With
Exit For
End If
Next r
End If
Next
End Sub
I am using vba code to copy only tick books, its done
but i want to copy invoice number etc. can some one write code for me how to copy invoice number till empty row in sales sheet
Copy Code is here
Sub CopyRows()
For Each chkbx In ActiveSheet.CheckBoxes
If chkbx.Value = 1 Then
For r = 13 To Rows.Count
If Cells(r, 1).Top = chkbx.Top Then
With Worksheets("sales")
LRow = .Range("e" & Rows.Count).End(xlUp).Row + 1
.Range("e" & LRow & ":i" & LRow) = _
Worksheets("Invoice").Range("c" & r & ":g" & r).Value
End With
Exit For
End If
Next r
End If
Next
End Sub