snasui.com ยินดีต้อนรับ ยินดีต้อนรับสู่กระดานถามตอบ Excel and VBA และอื่น ๆ ที่เป็นมิตรกับทุกท่าน มีไฟล์แนบมหาศาล ช่วยให้ท่านค้นหาและติดตามศึกษาได้โดยง่าย สมาชิกท่านใดที่ยังไม่ได้ระบุ Version ของ Excel ที่ใช้งานจริง สามารถทำตาม Link นี้เพื่อจะได้รับคำตอบที่ตรงกับ Version ของท่านครับ ระบุ Version ของ Excel
here are what the existing code do. 1. when i click the remove button it will ask me the asset number , 2. I type the asset number that i wanted to remove and paste it on the sheet2. - but here I just wanted to have few data , like the asset #, item description type and date it was remove and JOb order number to pasted on the sheet 2.
I wish just to copy a portion of the rows and also include the date where I extract it and assign a Job order .
I have already the code, and perfectly working. as you can see on the attached sheet, My concern is I once I click the remove button and type the asset tag that I want to remove on sheet 1 to transfer to sheet 2, once I run the code all data in row transfer.
'Other code
''========== Copy to another Sheet==
Dim Lr As Long
Lr = Sheet2.Range("B9999").End(xlUp).Row
With Sheet1.Range("B12:L" & Range("A" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellTypeVisible) '.Copy
Sheet2.Range("B" & Lr + 1).Resize(1, 3).Value = .Resize(1, 3).Value
Sheet2.Range("B" & Lr + 1).Offset(0, 3).Value = .Cells(1, 6).Value
End With
'==========Delete Entire Row====
'Other code