Need help to make a VBA program that extract data and create chart
Need help to make a VBA program that extract data and create chart
Why is this posted in "Book Reviews" forum?
Create chart where?
Have you done any research? Made any attempt?
How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Welcome to VBAX Kamel83. The following will create a chart.
Sub CreateChart() 'Declare variables Dim rng As Range Dim cht As Object 'Create a blank chart Set cht = ActiveSheet.Shapes.AddChart2 'Declare the data range for the chart Set rng = ActiveSheet.Range("A2:B9") 'Change the range to suit your requirements 'Add the data to the chart cht.Chart.SetSourceData Source:=rng 'Set the chart type cht.Chart.ChartType = xlColumnClustered 'Change the Chart type to suit your requirements End Sub
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link