ทำกราฟโชว์ที่Sheetหลัก (VBA)
Posted: Wed Apr 20, 2016 2:36 pm
ชุมชนความรู้ Excel และ Microsoft 365 สำหรับการทำงานจริง ตั้งแต่สูตร ฟังก์ชัน VBA, Power Query, PivotTable, Dashboard และ AI จนถึงการวิเคราะห์ข้อมูลและพัฒนาระบบงานในองค์กร
https://snasui.com/
Code: Select all
Dim c As Object
For Each c In ActiveSheet.Shapes
If Left(c.Name, 5) = "Chart" Then
c.Delete
End If
Next c
Sheets("หน้าหลัก").Shapes.AddChart.Select
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("กราฟ").Range("$B$3:$H$51")