Excel 2007 :: Rotating 3D Chart Using Mouse Events?
Dec 27, 2012
I'm using Excel 2007 and I have a reasonable level of experience with VBA coding in normal / object modules, but I have no experience with class modules or events ... so I do not have a good command on what goes into a normal module vice a class module if I want to use mouse events to rotate a chart.
I am looking to rotate a chart ... Since I am not allowed to post a file, I will give the 3D array here:
I have placed into a normal module the following code (based on what I was able to pick up from MSDN):
Dim myClassModule As New EventClassModule
Set myClassModule.myChartClass = Worksheets(1).ChartObjects(1).Chart
And I have placed the following code into a class module named EventClassModule (also based on what I was able to pick up from MSDN):
Public WithEvents myChartClass As Chart
I want to rotate the chart by using click and drag, and, if possible, I'd also like to be able to zoom in and out via some method (say a mouse wheel event).
In the following link, a guy has done a beautiful job of enabling scatter plot rotation using scroll bars, but I'd like to be able to use mouse events instead:
Is there a simple way to trap mouse and keyboard events in Excel, only within a VB loop, and then return to normal behavior after exiting the loop? That is, I want to know if a key is pressed (and what key) or the mouse clicked and not have it affect the spreadsheet. I don't want the key pressed to type into the spreadsheet.
I'm using Excel 2007. When I try to scroll with the mouse wheel, it doesn't do anything. If I hold down the control key and scroll with the mouse, it zooms in and out. So that works fine, but I can't do the basic scrolling up and down the document with the mouse wheel. There is no "Tools, Options" menu in 2007 so I don't even know where to find this type of option. The options available from the Office button are completely different.
In excel 2007, I have an embedded image on a sheet which I want to make it hidden by default. When someone hovers over a particular cell say cell B3, then image should be displayed below this cell (sort of hyperlinking) and when the cursor or activell cell is not in B3 it should be hidden again. What steps/technique/VBA code will make it happen ?
I did use the solution in a thread by Andy to make a picture or shape rotate. It works perfectly as a standalone. With this I mean all the information on the same sheet as per example in the file 901259.
I'am using it to rotate a dial. The problem is instead of using the value from the sheet itself I link the scrollbar to a cell on a different sheet in the same workbook. There some calculations are done and the value which makes the dial rotate is linked to that sheet. The dial however is on another sheet.
The calculations are almost displayed realtime but the dial is lagging. How would I go about to "solve" this lagging.
I want to use VBA to insert an Organisation Chart in Excel 2007 (ie if I did this manually it would be Insert, SmartArt, Hierarchy), but I cannot find anything on line that shows how to do this in Excel 2007. I know the code for Excel 2003, but that does not work in 2007.
I have excel 2007 and I came across the following difficulty:
If I create a graph (or a chart) the default size is "Letter". However, I can switch this "Letter" to "A4" which I need and then create a template. But I always have to manually choose this template for new charts. However switching this any time I create a new chart is a rather bad way to cope with. Even clicking on set as default obviously does not cause to have A4 size for new chart, it still has got size of Letter when adding a new chart.
I assume the solution could be in XLStart templates, but it probably doesnt work for charts that you add. Or at least I didnt find any clue on the internet for this problem.
I have built a chart using dynamic nameranges. The problem that I am facing is I tested it on two systems . One system the charts works fine but the other system the charts does not work . Both are excel 2007. Now the error that I get is if I see the chart data source from one system it is showing "!". The other file shows the chart data source as "0!". What should I be checking so that it works in the other system as well?
I have inherited a series of Word reports containing links to charts in several Excel files. I can tell by the link in Word that one of the charts is named 'Chart 6'. Is there an easy way to locate which chart in the Excel file is 'Chart 6' (and on and on for all of the other charts linked in the Word doc)? There are upwards of 21 charts in each Excel file linked to each of the Word reports. I am using 2007 but the files are in 2003 format because of limitations of the program from which the data comes for the charts.
I'm attempting to chart data obtained from our phone system to see when users are logged in/on rest.
I'm using Excel 2007.
The data we extract has: person | status | start | finish | duration
Status is either "login" or "rest" Start/finish is time (h:mm) Duration is a formula (h:mm, finish - start)
I want to have a stacked bar chart that shows when a person was logged in/on rest; one bar for each person.
x-axis: person y-axis: time (8am - 6pm) legend: status
The problem I'm encountering is that each person logs in and out multiple times throughout the day (therefore, has multiple lines to their name in the data), and I can't get this information to appear on a single bar for each person.
I've sorted the data into a pivot table which gives me the information I want, but how to get the chart.
Row labels a. Person b. status c. start
Values Min of duration
Ideally, I would like to avoid using a Gantt chart within cells (as it would involve vlookup/if statements), but am beginning to think that's my only option...
I'm having a problem with named ranges in a chart. I'm using Excel 2007 in Windows XP.
I have a line graph with twenty different series all using dynamic ranges. I created each series individually, typing the name and then the dynamic range I had previously defined. As far as I am aware, Excel demands when writing the reference that you specify which sheet/workbook this named range is from, so, given the scopes of my ranges are all 'workbook', I added the name of the workbook to the references.
Series name: Series1
Series values: ='workbook name'!range1
This seems to work fine, but when I save and then re-open the file, the dynamic ranges no longer work. If I go to Select Data and look at the reference for a series, it has been changed thus:
In versions prior to Excel 2007, I was always able to copy a chart when I copied a tab. However, when I copy a tab in 2007, the data copies fine, but the chart does not. Something similar happens when I try to move a tab with a chart on it to another workbook.
I'd like to use two columns / labels to create a colorful bar chart that just piles each field value on top of each other and shows the amount (and percent of total if I can) along the first column's values next to the bar chart something like below..
So column 1 is the "entity name" and column 2 is the "value/amount".
I can't make this chart look right at all. I have Excel 2007.
I am building this waterfall chart. I'd like to put conditional color formatting to change the vertical bar automatically e.g. if it is positive, the bar color is green and if it is negative the bar color is red.
I have six colums (Date; Skill; ST Hrs; OT hrs: Area; Type). I copied and pasted below a small portion of info from the spreadsheet. I know when I copy and paste into a post the information under the headers don't line up exactly...it appears offset, so basically "Date" is of course the date you see..."Skill"'s columns has the first item as nb-mech b..."ST Hrs" first item will be 0.00..."OT Hrs" will be 1.50...."Area"'s first item is "Log FM NO"....and "Type"'s first item is MX07
And there are 17,000 rows of this info and forever growing...a lot of repeated items in each column such as you can see "blaster" has multiple entries on 4/1/2012.
What I am attempting to do which I have not firgured out yet (i have tried array formulas but they bog down the pc forver and couldn't figure out exactly how to make it give me the results I needed...and I also tried sumproducts but that didnt get me what I wanted....and it is being requested of me to NOT make a pivot table but a chart.
What I am trying to create is is the following:
1 - cells to plug in a date range for example cell A1 I plug 4/1/2012 and cell A2 plug 4/30/2012 2 - drop down boxes for columns Skill; Area: Type, which show only unique records in each column
Once I have that, I could then filter all 3 itmes and have only items show in the date ranges I picked and present ONLY the SUMS of columns ST Hrs and OT hrs.
Once the SUMS show up, I can then have cells off to the side that will give a percent break down of what percent of the total hours (for the chose criteria) are ST Hrs and what percent of the total are OT Hrs....and this percentage break down will show up in a Bar Chart, per day chosen in my date ranges....I'm thinking one simple stacked bar per day in the chart.
So say, based on the info below, I wanted to see the total ST Hrs and OT Hrs from 4-1-12 to 4-2-12 for a nb-blaster in LOG FM NO and type MX06.....my result would be 0.00 ST Hrs...23 OT Hrs.....and my bar chart would be one simple bar peaked out at 23 on day 4-1-12.....and within the bar it would be 0.00% ST Hrs and 100% OT Hrs and maybe the total hours for each showing also..don't need that but it may be useful.. ..and no bar for 4-2-12 (because the criteria picked had no hours for 4-2-12)
I have been messign witht is all week and just can't nail it.. I do remember a while ago I would have been able to load the spreadsheet into the post and people could see it in excel...is that option to do that no longer on this site?
My chart data range is: ='Summary Data'!$A$2:$BF$8.
Since it expands a few times a week to BG, BH, BI etc., it seemed to make sense to use the standard OFFSET and COUNTA formula to expand it. The every time I typed the Offset formula in, it worked but each time I save it, it changes to an updated (correct) fixed reference. i.e. back to the format above.
Many threads I've read seem to say that you should be able to use an expanding range in charting.
I have an embedded chart with a data series and a horizontal line that changes position (y-intercept) by values entered into a textbox. To make the process more user friendly, I would like to allow the user to select this horizontal line and reposition it inside the chart with the mouse. The new y-intercept of the line should then be displayable (textbox, cell, whatever). From what I have read on Peltier's site, I will definitely need to write a new class. Classes in VBA is not something I am particularly familiar with..
I created 5 charts and instead of having them spread everywhere in the worksheet, I would like them to be "reduced" to some kind of a link contained in a cell (at the botom of the data of each chart). Then, I would like the chart to appear only if I put the mouse on this cell.
I am stuck trying to sort data that looks like the following, into a format that I can use as source data for pivot tables/charts.
Excel2007ABCDEFGHIJK2MalayMalayMalayMalayMalayMalay ChineseChinese3MaleFemaleFemaleMaleFemaleFemaleMaleMale 436-4536-4536-4525-3525-3525-3536-4536-455 DateArticleContentLapseCurrentCurrentCurrentLapseLapseCurrentCurrent612-SepRelieving 40 years - Oct 15, 1972 Thick Haze continues to blanket MalaysiaHistory42712-SepRelieving 40 years - May 5, 1972 All Sharifah wants is a pair of legsHistory1222812-SepA man and his agonyHistory3223912-SepA lesson on Sept 16History22Sheet2
I will need to group Data multiple ways. However, I cant work out a good way to sort it. Can I have a suggestion on layout that I will be able to arrange data appropriately.