Private Sub CommandButton1_Click()
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = 4 To LastRow
If Cells(i, 6) = "Today" Then
Range(Cells(i, 1), Cells(i, 5)).Select
Selection.Copy
Workbooks.Open Filename:="C:\Users\robi\Desktop\Client.xlsx"
Dim p As Integer, q As Integer
p = Worksheets.Count
For q = 1 To p
If ActiveWorkbook.Worksheets(q).Name = "robiul" Then
Worksheets("robi").Select
End If
Next q
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.CutCopyMode = False
End If
Next i
End Sub
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = 4 To LastRow
If Cells(i, 6) = "Today" Then
Range(Cells(i, 1), Cells(i, 5)).Select
Selection.Copy
Workbooks.Open Filename:="C:\Users\robi\Desktop\Client.xlsx"
Dim p As Integer, q As Integer
p = Worksheets.Count
For q = 1 To p
If ActiveWorkbook.Worksheets(q).Name = "robiul" Then
Worksheets("robi").Select
End If
Next q
erow = ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
ActiveSheet.Cells(erow, 1).Select
ActiveSheet.Paste
ActiveWorkbook.Save
ActiveWorkbook.Close
Application.CutCopyMode = False
End If
Next i
End Sub
কোন মন্তব্য নেই:
একটি মন্তব্য পোস্ট করুন