vba-对应单元格插入批注+底纹为图片
Sub 对应插入批注图片() Dim x As Integer On Error Resume Next '错误跳过 For i = 1 To 2 Cells(i, 1).Comment.Delete '删除批注 Range("A" & i).AddComment Range("a" & i).Value '新建批注 Range("A" & i).Comment.Shape.Fill.UserPicture "C:\Users\lison\Pictures\Saved Pictures\" & Range("a" & i).Value _ & ".jpg" '给批注增加图片 Range("A" & i).Comment.Shape.Width = 100 '设置批注宽度 Range("A" & i).Comment.Shape.Height = 100 '调协批注高度 Next End Sub