Public Sub addall() On Error Resume Next Dim VPicFile, re As Range ' For i = 2 To 11 Step 3 ' For j = 1 To 13 Cells(2, 2).Activate Set re = ActiveCell VPicFile = ThisWorkbook.Path & "\jpg\莫有明.jpg" ' & ActiveCell.Offset(1, 0) & ".jpg" ActiveSheet.Shapes.AddPicture VPicFile, msoTrue, msoCTrue, re.Left, re.Top, re.Width, re.MergeArea.Height ' Next 'Next End Sub |
|