Surface Chart In VBA 2013

redschari

New Member
Joined
Oct 31, 2013
Messages
1
S0 ive been looking online for various example on how to make a surface chart in vba by taking values in one worksheet and displaying it in another but havent really found anything to help. The code I used(which I will display below) displayed the chart but in the increments in the axis were wrong and it only displayed on the worksheet it took the values from. My question is what is the proper way to create a surface chart in VBA, fixing the X and Y axis to the proper increments( lets say it increases by two) and displaying it in another sheet.

With ActiveSheet.ChartObjects.Add _ (Left:=100, Width:=375, Top:=75, Height:=225) .Chart.SetSourceData Source:=WorkSheets(2).Range("B2:BJ62") .Chart.ChartType = xlsurface
End WIth

Thank you for any help.
 

Some videos you may like

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.

Watch MrExcel Video

Forum statistics

Threads
1,123,366
Messages
5,601,207
Members
414,434
Latest member
Riyen

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top