tungstchn
Thành viên mới
- Tham gia
- 7/10/19
- Bài viết
- 18
- Được thích
- 3
Vâng mục đích thì như tiêu đề ạ. E lọ mọ làm cái code bên dưới, nó đã thay đc như mong muốn nhưng vẫn lỗi "objec variable or with block variable not set" cái đoạn chữ đỏ ý ạ. Các bác giúp e với ạ. Cảm ơn các bác nhiều!!!!
Sub thu_nghiem()
Do While Cells.Find(What:="!", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Value <> "0"
Cells.Find(What:="!", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Loop
End Sub
Sub thu_nghiem()
Do While Cells.Find(What:="!", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Value <> "0"
Cells.Find(What:="!", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False _
, SearchFormat:=False).Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Loop
End Sub
Lần chỉnh sửa cuối: