当前位置:编程学习 > VB >>

想用VBA在窗体里画图请问怎么做到??

想用VBA在窗体里根绝坐标画图,请问怎么做到,本人新手,请说的详细些 谢谢~~~~~ --------------------编程问答-------------------- 不熟悉,不过知道VBA不能用API,那估计就只能用第三方控件实现了 --------------------编程问答--------------------
    XLWorkBook.Charts.Add
    XLWorkBook.ActiveChart.ChartType = xlColumnClustered
    XLWorkBook.ActiveChart.Legend.Clear
    XLWorkBook.ActiveChart.SetSourceData Source:=XLWorkSheet.Range("Q2:Q16"), PlotBy:=xlColumns
    XLWorkBook.ActiveChart.SeriesCollection(1).XValues = "=Sheet1!R2C1:R16C1"
    XLWorkBook.ActiveChart.Location Where:=xlLocationAsObject, Name:="Sheet1"
    XLWorkBook.ActiveSheet.Shapes("图表 1").IncrementLeft -205.5
    XLWorkBook.ActiveSheet.Shapes("图表 1").IncrementTop -125.75
    XLWorkBook.ActiveSheet.Shapes("图表 1").ScaleWidth 1.82, msoFalse, msoScaleFromTopLeft
    XLWorkBook.ActiveSheet.Shapes("图表 1").ScaleHeight 1.97, msoFalse, msoScaleFromTopLeft
    XLWorkBook.ActiveChart.Axes(xlCategory).TickLabels.Font.Size = 12
补充:VB ,  VBA
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,