Thanhlam2425
Thành viên hoạt động
- Tham gia
- 23/11/18
- Bài viết
- 113
- Được thích
- 12
Mọi người cho em hỏi vấn đề là.Em có 1 đoạn code lấy ảnh từ thư mục nhưng khi gửi ảnh cho người khác thì bị lỗi không xem được.Mọi người sửa giúp em đoạn code này ạ.Em cảm ơn.
Mã:
Sub anhluu1()
Dim name As String, duonglink As String
With Sheets("receive")
name = .Range("A4").Value
End With
On Error Resume Next
ActiveSheet.Shapes("PIC1").Delete
With Application.FileDialog(msoFileDialogFilePicker)
.Show
duonglink = .SelectedItems(1)
End With
With ActiveSheet.Pictures.Insert(duonglink)
.name = "PIC1"
End With
With ActiveSheet.Shapes("PIC1")
.LockAspectRatio = False
.Left = [L5:l5].Left: .Top = [L5:l5].Top
.Width = [L5:l5].Width: .Height = [L5:l5].Height
End With
End Sub