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'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:
1.0000 2.0000 3.0000 4.0000
I have placed into a normal module the following code (based on what I was able to pick up from MSDN):
Code: Dim myClassModule As New EventClassModule Sub InitializeChart() Set myClassModule.myChartClass = Worksheets(1).ChartObjects(1).Chart End Sub
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):
Code: 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:
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.
I am having a problem updating a jpg file in an existing Excel file which I created. There is a LOGO in the right hand side Header block which I can delete ( the words &(Picture) appear after the logo is deleted. For some reaon I cannot replace this LOGO with a newer version. The new LOGO appears in the body text area, bot it will not drag into the header. I must have missed something very basic!!
So far my VBA will copy my range of cells in Excel and paste them into Powerpoint but I'm totally stuck as to how to resize the image from there. I've tried a bunch of different methods and I get some pretty crazy results but can't seem to punch through to a solution. What I'd like it to do, at the end of the VBA is:
Set the lock aspect ratio to false Set the Height to 5.5" Set the Width to 9.83" Set the horizontal position to .08 from Top Left Set the Vertical position to .58 from Top Left
I cannot seem to get my save as portion to work at all. I commented it out at the bottom. This is all in Excel and PPT 2007.
Here is what I have so far:
Dim ppApp As PowerPoint.Application Dim ppSlide As PowerPoint.Slide On Error Resume Next Set ppApp = GetObject(, "PowerPoint.Application") On Error GoTo 0
Ultimately the behavior I'm looking for with this macro is to copy a filtered range of cells from Excel and paste it as a picture into Powerpoint (up til this point I'm golden) then resize the image on the slide, save the presentation, then exit PPT.
I have a few dozen pictures created when a macro runs. They all have unique names. I'd like to add comments to cells, where the cell.value decides which picture to pull. All the examples I've found online show how to do this if you have pictures saved on your hard drive by referencing the file path "c://mydocs/...blahblah/"
Is there a way to reference the pictures I've created/named with my macro?
Here's the snippet of code that creates the pictures and names them:
Code: For i = 2 To Application.CountA(Sheets("Allocation").Rows(1)) Sheets("Allocation").Activate Set rInput = Sheets("Allocation").Range(Cells(1, i), Cells(10, i)) sPicName = "_" & Sheets("Allocation").Cells(1, i) & "_" sSheet = Sheets("Allocation").Cells(3, i) dDate = Sheets("Allocation").Cells(5, i)
Here are some examples that are close to what I'm looking for.
VBA Popup Pictures - 1108 - Learn Excel from MrExcel Podcast - YouTube VBA Express : Excel - Add pictures that float like comments.
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 written a sub with the purpose of finding rows based on a critieria, copying the rows to another worksheet and deleting the original row.
Code: Sub MoveToIgangvaerende() ' ' Flytter opgaven til sheetet Igangværende projekter ' Dim i, j, Index As Integer Forfra: For i = -1 To 1000 If Sheets("Pipeline").Cells(3 + i, 20) = "Ja" Or Sheets("Pipeline").Cells(3 + i, 20) = "ja" Then
I get the error message "Method 'Delete' of object 'Range' failed" at the line "Sheets("Pipeline").Cells(3 + i, 18).EntireRow.Delete".
I started a new job and my new company uses Excel 2010 (64-Bit). The code below was written for use in Excel 2007. I am trying to open an XML file and simply paste the results in a spreadsheet but I am getting this error, "Method 'OpenXML' of object 'Workbooks' failed" at the "set oWX" line in the code.
Sub GetNetTIEDAH() Dim idate As Integer Dim strThisBook As String
I have a macro that exports a row (or rows) to destination sheet ("Amber") based on criteria in Column K. Once exported I return to the source sheet ("Register") and the row that had the data that I wanted exported has exported the info but the row just sits where it was and appears to only 'clear the contents'. The macro I use is:
Sub Extract_FW_Rows() Set ws = ActiveSheet endrow = ws.Cells(65000, 1).End(xlUp).Row For i = endrow To 1 Step -1
I set up the macro on Excel 2002 in work as thats what we have....however when I input the same code into my home laptop working Excel 2007, all works perfectly i.e. it cuts the data to destination sheet, goes back to source sheet and the rows have moved up accordingly - I do realise that the action taken is a row removal i.e. I had 1000 rows, macro executes, I now have 999 rows in the source sheet.
What I would like is the same result in 2002 as I get in 2007.
I got the following script from another site. What it is intended to do is that it has three columns in a sheet.
Column A = Folder Name Column B = Sender Name or Mail Subject Column C = Values for Column B
Based on what values are in Column C (sender name or email subject), it will then look at the mails in outlook within the 'inbox' folder and look for the matching criteria and if it finds a match, move it to the folder named in column A (if folder does not exist, create folder)
Running the script, I get runtime error '438' object does not know property or method - on the line highlighted in red. I am using office 2007 and looking at the code, it is using late binding so no reference library is needed?
Code: Option Explicit Const olFolderInbox = 6 Sub moveOutlookMails() Dim wkb As Workbook Dim wks As Worksheet Dim rng As Range
I have some VBA code that in one portion of it an Outlook e-mail is created and the active workbook is attached and sent. This code used to work on Excel & Outlook 2003, but now in Excel & Outlook 2007 I'm getting the error:
Is it possible to display a name on a chart that is not the X or Y value?
I've been sent this macro which displays the school name on a chart when the mouse is on the data point - its all well and good but on the graph I am working on, the X and Y value are both values and I want the school name to come up as well.
Private Sub Chart_MouseMove(ByVal Button As Long, ByVal Shift As Long, ByVal x As Long, ByVal y As Long) 'macro that gets chart to show user details of a point on the chart when the mouse is moved over it Dim ElementID As Long, Arg1 As Long, Arg2 As Long Dim myX, myY As Variant
With ActiveChart .GetChartElement x, y, ElementID, Arg1, Arg2
If ElementID = xlSeries Then 'checks to see which part of the chart the mouse is over
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'm working in Excel 2007 and need to move data from multiple rows to a single row if the ID matches.Below is sample data I would be working with. I want to move data from columns F-U to the right of the original data in the row above it. I would also like to delete the rows that had data moved.
GIDSurnameNameEmployee Number OriginalDate of birthGranting ARE Employing ARECountry Employing ARECHCM Supplier IDVehicle Investmt. shares / Awards at termination dateMatching Shares at termination dateTermination
I found a VBA code to print all my charts in my project. It works well. The issue I am having now is trying to amend the code to also print a picture object I made with the camera tool. The picture object "Picture 52" displays on the print preview, but despite all the different things I tried from various post, it doesn't work. I have since went back to the original code.
On one sheet I have a table of contents that has a name in column A. In column B I currently have a hyperlink to some text to take me to a cell under a drawing object in another sheet. I wanted to make this more elegant and easier to see which object you are supposed to look at. To do this I thought of using VBA and anchoring a text box in column B of the TOC sheet that I could attach a macro to. Below is my code but it means I need a separate macro for each object. I have 200 and counting. The text in the adjacent cell in column A contains the name. Is there some way for the macro to know what row the control object is in so that it can get the name from the adjacent cell?
Second question. Is there a routine like .OnSelection where I could change the background color of the object only when it is selected? So when another object is selected the previous one reverts back to the original condition.
I want to have a sample file in excel which store picture of student in comment, I did this, but when I want to insert picture the file dialog appears, and if I click cancel, then there is an error, why? If some one optimise the code it would be very nice
In Excel 2010, is there any way to paste a picture into a small picture/diagram box, and upon double clicking the picture it would explode to a larger size? And I guess double clicking it again would make it return to its original (smaller) size. I would be pasting several pictures into several different picture/diagram boxes and would need this to be a relative reference so that upon selection it explodes the appropriate picture?