Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel VBA - Add an image to a sheet and name it

Posted on 2014-03-09
2
Medium Priority
?
487 Views
Last Modified: 2014-03-10
Hi

What VBA code would I use to add an image to a specific Excel cell and name it
0
Comment
Question by:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 2000 total points
ID: 39916827
This code inserts a picture positioned on cell C3 on Sheet1:

        With ThisWorkbook.Sheets("Sheet1").Pictures.Insert("C:\Users\Kevin Jones\Pictures\IM Avatars\zorvek.jpg")
        .ShapeRange.IncrementLeft ThisWorkbook.Sheets("Sheet1").Range("C3").Left
        .ShapeRange.IncrementTop ThisWorkbook.Sheets("Sheet1").Range("C3").Top
        .Name = "MyPicture"
    End With

Open in new window

Kevin
0
 

Author Closing Comment

by:Murray Brown
ID: 39916856
Thanks very much
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Graphs within dashboards are meant to be dynamic, representing data from a period of time that will change each time the dashboard is updated with new data. Rather than update each graph to point to a different set within a static set of data, t…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question