
excel里多张图表绘图区调为一样大?
2个回答
展开全部
1楼的操作也可以实现调整大小,但是相关格式没法调整。
楼主可以研究一下我的做法:
打开菜单“工具”---“宏”---“VB编辑器”,双击所在sheet表,把以下代码粘贴进去,保存。
然后按shift键,选定你所有的图表,打开菜单“工具”---“宏”---“宏”---选择“调整图表大小”---“执行”宏
具体的图表你还可以调节代码去调整长宽、字体格式等元素。
Sub 调整图片大小()
Selection.ShapeRange.Height = 150
Selection.ShapeRange.Width = 240
End Sub
Sub 调整图表区格式()
With Selection.Border
.Weight = 2
.LineStyle = 0
End With
Selection.Interior.ColorIndex = xlAutomatic
Selection.AutoScaleFont = False
With Selection.Font
.Name = "宋体"
.FontStyle = "常规"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Interior.ColorIndex = xlNone
ActiveChart.Legend.Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.Interior.ColorIndex = xlNone
End Sub
Sub 调整单轴绘图区()
ActiveChart.PlotArea.Select
Selection.Top = 7
Selection.Width = 205
Selection.Height = 115
Selection.Left = 15
End Sub
Sub 调整双轴绘图区()
ActiveChart.PlotArea.Select
Selection.Top = 7
Selection.Width = 195
Selection.Height = 115
Selection.Left = 15
End Sub
Sub 复制图像()'偷懒,不用按shift键了
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:= _
xlPicture
End Sub
楼主可以研究一下我的做法:
打开菜单“工具”---“宏”---“VB编辑器”,双击所在sheet表,把以下代码粘贴进去,保存。
然后按shift键,选定你所有的图表,打开菜单“工具”---“宏”---“宏”---选择“调整图表大小”---“执行”宏
具体的图表你还可以调节代码去调整长宽、字体格式等元素。
Sub 调整图片大小()
Selection.ShapeRange.Height = 150
Selection.ShapeRange.Width = 240
End Sub
Sub 调整图表区格式()
With Selection.Border
.Weight = 2
.LineStyle = 0
End With
Selection.Interior.ColorIndex = xlAutomatic
Selection.AutoScaleFont = False
With Selection.Font
.Name = "宋体"
.FontStyle = "常规"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
.Background = xlAutomatic
End With
ActiveChart.PlotArea.Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Interior.ColorIndex = xlNone
ActiveChart.Legend.Select
With Selection.Border
.Weight = xlHairline
.LineStyle = xlNone
End With
Selection.Shadow = False
Selection.Interior.ColorIndex = xlNone
End Sub
Sub 调整单轴绘图区()
ActiveChart.PlotArea.Select
Selection.Top = 7
Selection.Width = 205
Selection.Height = 115
Selection.Left = 15
End Sub
Sub 调整双轴绘图区()
ActiveChart.PlotArea.Select
Selection.Top = 7
Selection.Width = 195
Selection.Height = 115
Selection.Left = 15
End Sub
Sub 复制图像()'偷懒,不用按shift键了
ActiveChart.CopyPicture Appearance:=xlScreen, Size:=xlScreen, Format:= _
xlPicture
End Sub

2024-07-20 广告
作为深圳市博思云创科技有限公司的工作人员,对于Word文档生成PPT的操作,我们有以下建议:1. 使用另存为功能:在Word中编辑完文档后,点击文件->另存为,选择PowerPoint演示文稿(*.pptx)格式,即可将文档内容转换为PPT...
点击进入详情页
本回答由博思aippt提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询