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.
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off

Forum statistics

Threads
1,222,827
Messages
6,168,482
Members
452,192
Latest member
FengXue

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
Back
Top