|
- Sub 全部()
- 'Application.EnableEvents = False
- 'Application.ScreenUpdating = False
- 份数 = Cells(1, 7)
- For i = 1 To 9
- With ActiveSheet.ChartObjects("图表 " & i)
- Range(.TopLeftCell, .BottomRightCell).PrintOut copies:=1
- 'ActiveWindow.SelectedSheets.PrintOut Copies:=份数
- 'ActiveWindow.SelectedSheets.PrintOut copies:=1
- End With
- Next i
- Application.EnableEvents = True
- Application.ScreenUpdating = True
- End Sub
- Sub 图()
- 'Application.EnableEvents = False
- 'Application.ScreenUpdating = False
- 份数 = Cells(1, 7)
- 开始 = Cells(2, 6)
- 结束 = Cells(2, 8)
- If 开始 = 0 Then GoTo 5
- If 结束 = 0 Then 结束 = 9
- For i = 开始 To 结束
- 'ActiveSheet.ChartObjects("图表 " & i).Activate
- With ActiveSheet.ChartObjects("图表 " & i)
- Range(.TopLeftCell, .BottomRightCell).PrintOut copies:=1
- End With
- Next i
- 5:
- Cells(1, 7) = 1
- Cells(2, 6) = ""
- Cells(2, 8) = ""
- Application.EnableEvents = True
- Application.ScreenUpdating = True
- End Sub
复制代码 你试试。 |
|