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.
 

Some videos you may like

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

smiler

Board Regular
Joined
Jan 26, 2007
Messages
161
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
 

ghr

New Member
Joined
Apr 9, 2012
Messages
6
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!
 

Watch MrExcel Video

Forum statistics

Threads
1,122,832
Messages
5,598,361
Members
414,233
Latest member
WolverineNurse

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