以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何用VBA设置excel图表背景透明  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=102322)

--  作者:一笑
--  发布时间:2017/6/17 12:06:00
--  如何用VBA设置excel图表背景透明
在狐表中命令窗口中运行vba,生成图表,想设置图表背景为透明

录制宏中代码为:
    ActiveChart.PlotArea.Select
    ActiveChart.ChartArea.Select
    ActiveSheet.Shapes("图表 1").Fill.Visible = msoFalse
试着狐表改为:
cht.Fill.Visible = msoFalse
不管用,请教狐表命令窗口中代码,谢谢

--  作者:有点蓝
--  发布时间:2017/6/17 14:07:00
--  
ChartArea
返回图表区域。
如将图表区域的内部颜色设为红色,并将其边框颜色设为蓝色:

With Cht.ChartArea
    .Interior.ColorIndex = 0
    .Border.ColorIndex = 5
End With