Thanhlam2425
Thành viên hoạt động



- Tham gia
- 23/11/18
- Bài viết
- 113
- Được thích
- 12
Các anh chị trong GPE cho em hỏi.
Em gặp lỗi là mỗi khi em dùng code copy 1 ảnh nào đó trong sheets.Rồi paste vào sheets khác thì ảnh trong sheets bị copy nó bị mờ đi.Rất khó nhìn.
Anh chị cho em hỏi nó là bị lỗi gì ạ.Em cảm ơn.
Code của em viết lấy ảnh đây ạ.
Em gặp lỗi là mỗi khi em dùng code copy 1 ảnh nào đó trong sheets.Rồi paste vào sheets khác thì ảnh trong sheets bị copy nó bị mờ đi.Rất khó nhìn.
Anh chị cho em hỏi nó là bị lỗi gì ạ.Em cảm ơn.
Code của em viết lấy ảnh đây ạ.
Mã:
Sub xemanh()
Dim s As String
With Sheets("show")
.Unprotect 123 'code mo pass
s = .Range("A5").Value & "KT"
If kiemtra("PIC1", Sheets("show")) = True Then
.Shapes("PIC1").Delete
End If
If kiemtra(s, Sheets("log")) = True Then
Sheets("log").Shapes(s).Copy
.Activate
.Paste
With Selection
.name = "PIC1"
.ShapeRange.LockAspectRatio = False
.Left = [A7:E7].Left
.Top = [A7:E7].Top
.Width = [A7:E7].Width
.Height = [A7:E7].Height
End With
End If
s = .Range("A5").Value & "TQ"
If kiemtra("PIC2", Sheets("show")) = True Then
.Shapes("PIC2").Delete
End If
If kiemtra(s, Sheets("log")) = True Then
Sheets("log").Shapes(s).Copy
.Activate
.Paste
With Selection
.name = "PIC2"
.ShapeRange.LockAspectRatio = False
.Left = [F7:H7].Left
.Top = [F7:H7].Top
.Width = [F7:H7].Width
.Height = [F7:H7].Height
End With
End If
.Protect 123 'code dong pass
End With
End Sub