|
- Sub main()
- Dim Rng As Range, Desktop As String
- If TypeName(Selection) <> "Range" Then MsgBox "必须选择单元格!", , "提示": Exit Sub
- If Selection.Areas.Count > 1 Then MsgBox "只能选择一个区域!", , "提示": Exit Sub
- Set Rng = Range("A2:b5")
- Desktop = CreateObject("WScript.Shell").SpecialFolders("Desktop")
- For I = 10 To 15
- Range("A7") = Cells(I, 2)
- Rng.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
- ActiveSheet.Pictures.Paste.Select
- With Selection
- .Copy
- With ActiveSheet.ChartObjects.Add(0, 0, Selection.Width, Selection.Height).Chart
- .Paste
- .Export Desktop & "\m" & Range("A1") & ".jpg"
- .Parent.Delete
- End With
- .Delete
- End With
- Application.Wait (Now + TimeValue("0:00:01"))
- Next
- End Sub
复制代码 |
评分
-
查看全部评分
|