◆◆◆急::: VBA_Excel:为什么在生成折线图的时候,以新建图表方式不能成功呢? ◆◆◆

xarrow 2005-03-23 05:03:53
代码如下:
失败的创建 -> ActiveChart.Location Where:=xlLocationAsNewSheet, Name:="图表名称"
成功的创建 -> ActiveChart.Location xlLocationAsNewSheet
...全文
1701 10 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
crycoming 2005-08-03
  • 打赏
  • 举报
回复
Sub MoveChart()
Dim x As Chart
' Create an embedded chart on a chart sheet.
Set x = Charts.Add
x.ChartType = xlColumnClustered
x.SetSourceData Source:=Sheets("Sheet1").Range("A1:C4")
Set x = x.Location(where:=xlLocationAsObject, Name:="Sheet1")
' Move chart to new sheet and reset the chart object variable x.
Set x = x.Location(where:=xlLocationAsNewSheet, Name:="Chart1")

' Move chart to back to the chart sheet.
Set x= x.Location(where:=xlLocationAsObject, Name:="Sheet1")
End Sub
sdrcxzy 2005-08-03
  • 打赏
  • 举报
回复
xarrow(HELLO WORLD)睡了回龙觉?幸福啊
arrowy 2005-08-03
  • 打赏
  • 举报
回复
察看VBA
xarrow 2005-03-29
  • 打赏
  • 举报
回复
UPUP
xarrow 2005-03-28
  • 打赏
  • 举报
回复
二次早起UP
xarrow 2005-03-28
  • 打赏
  • 举报
回复
高手帮帮忙啊
icechj 2005-03-25
  • 打赏
  • 举报
回复
帮顶,同问!
xarrow 2005-03-25
  • 打赏
  • 举报
回复
UPa
xarrow 2005-03-24
  • 打赏
  • 举报
回复
早起,UP下
xarrow 2005-03-24
  • 打赏
  • 举报
回复
UPUP

2,503

社区成员

发帖
与我相关
我的任务
社区描述
VBA(Visual Basic for Applications)是Visual Basic的一种宏语言,是在其桌面应用程序中执行通用的自动化(OLE)任务的编程语言。
社区管理员
  • VBA
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧