Sub button _Click ()
Dim nowmonth As String
Nowmonth="12"
Dim mybook As Workbook
The Set mybook=Workbooks. Open (ThisWorkbook. Path & amp; "" 2020 & amp; Nowmonth & amp; "(1) month. XLS")
Dim target As Workbook
The Set target=Workbooks. Open (ThisWorkbook. Path & amp; "\ results. XLSX")
Dim picnum As Integer
'Set mybook=Workbooks (ThisWorkbook Path & amp; "\ (1) in February 2020. XLSX")
For j=1 To 30 'lines
'Sheets (" sheet1 "). The Range (j) Copy ThisWorkbook. Sheets (" sheet3 "). The Range (j)
'Call line copy (j)
Picnum=0
Mybook. Sheets (" sheet1 "). The Rows (j) Copy mybook. Sheets (" sheet2 "). The Rows (j)
For I=1 To mybook. Sheets (" sheet2 ") Shapes. Count
Picnum=picnum + 1
The Set s=mybook. Sheets (" sheet2 "). The Shapes (I)
PicRow=s.T opLeftCell. Row
Sku=mybook. Sheets (" sheet2 "). The Cells (picRow, 1)
S. idth=s. idth * 2
Sheldon horowitz Sheldon horowitz at eight=eight * 2
If sku & lt;> "" Then
S.C opy
The Set c=mybook. Sheets (" sheet2 "). ChartObjects. Add (0, 0, s. idth and Sheldon horowitz eight)
C.a. ctivate
Arthur c. hart. Paste
Arthur c. hart. Export "D: \ \ cs 2020 _" & amp; Nowmonth & amp; "_" & amp; Sku & amp; ". JPG "' in D set, a new folder (CS)
C.D elete
End the If
Next I
Mybook. Sheets (" sheet1 ") Cells (j, 21). The Value=https://bbs.csdn.net/topics/picnum
Dim Shp As Shape
For Each Shp In mybook. Sheets (" sheet2 "). The Shapes
Shp. Delete
Next
Mybook. Sheets (" sheet2 "). The Range (" "5536"). The Clear
Next j
Mybook. Close
Target. Close
The Set mybook=Nothing
The Set target=Nothing
End Sub