Tags:

ดูให้หน่อยว่าผิดตรงไหน ใส่รูปได้ แต่เวลาลบ จะขึ้น Error

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("I")) Is Nothing Then Exit Sub
Dim myPict As Picture

With Cells(Target.Row, "B")
Set myPict = Cells(Target.Row, "B").Parent.Pictures.insert("D:\imagee\" & Target.Value & ".jpg")
myPict.Top = .Top
myPict.Width = .Width
myPict.Height = .Height
myPict.Left = .Left
myPict.Placement = xlMoveAndSize
End With

End Sub

Get latest news from Blognone
By: MrThursday
ContributorRed HatUbuntuWindows
on 23 February 2016 - 09:33 #886738

จะทำอะไรครับ รบกวนอธิบายชัดๆ

Edit: บรรทัดที่ 2 ใส่ on error resume next