Manually dragging 3D chart around using mouse

ghr

New Member
Joined
Apr 9, 2012
Messages
6
Hello,

I have searched quite a bit but could not find an answer for my problem.

I am using the wonderful code from http://www.doka.ch/Excel3Dscatterplot.htm to represent a 3D chart using the Excel 2D XY Scatter Plot chart.

It comes with scroll bars which allow the graph to be interactively rotated. These work fine. My goal is to make this more intuitive by allowing the user to drag the graph around using their mouse (and therefore remove the scroll bars).

I have succeeded in writing VBA to do this, using a class to capture the chart (it's an embedded one) mouse events and rotate accordingly.

The problem I am having is removing the wireframe rectangle that is painted by Excel itself as I drag the graph around. Visually, it's very annoying so I am really keen to remove it. I am hoping it's not totally built-in and non-hideable.

Here is a screen shot of the graph being dragged with the dashed blue rectangle making its unwanted presence felt.

GraphDraggingRectangle.png


Many thanks in advance.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
hi,

This is not an answer but a guide as to where you might need to look,

the 'bounding box' colour is part of the system colour palette and is the 'Selected Items' colour - changing this to the background colour will hide it, but will also set the colour of anything selected to white.

you could change the colour whilst rotating, then set back to its original when the process ends - just an idea
 
Upvote 0
Hi Smiler,

Thanks for your thoughts on the matter. After some playing, I understand the following:

The bounding rectangle is indeed coloured by the selected colour, which in Excel is known as SystemColorConstants.vbHighlight.

I confirmed this by comparing the hue numbers in the following image and in both cases, it's 148 (with different saturation and/or luminance levels). Good start.

SystemHighlightColor.png


I confirmed you can change the Excel palette colours using ActiveWorkbook.Colors(color_index) = RGB(r, g, b). Interesting but not useful here.

However, this is where I come unstuck. I am not sure how to change the System colours in Excel.

Can anyone help here?

Or does anyone have any further thoughts to my original issue?

Many thanks!
 
Upvote 0

Forum statistics

Threads
1,214,979
Messages
6,122,550
Members
449,088
Latest member
davidcom

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