Solved

Inserting Image and Text into the same Excel Box

Posted on 2014-01-16
2
252 Views
Last Modified: 2014-01-16
Hello Excel Experts.

I am using Excel 2007 for windows.

I have some cells where I want to insert both text and images.

What is the best method to do this.

Thanks!

Rowby
0
Comment
Question by:Rowby Goren
2 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39785586
You can't. You cannot put pictures "in" a cell, only "over" it. All pictures "float" on the worksheet. You can position a picture over a cell by setting its Top and Left properties to the Top and Left of the cell. Then you could insert text in any cell including directly above or beneath the picture.

Set p = ws.Pictures.Insert("C:\Sample.jpg")

Set objRng = ws.Range("A2:B5")
With p
   .Top = objRng.Top
   .Left = objRng.Left
   .Width = objRng.Width
   .Height = objRng.Height
End With

ws.Range("A1").Value = "myTop"
ws.Range("B6").Value = "myBottom"
0
 
LVL 9

Author Comment

by:Rowby Goren
ID: 39785720
Thanks   That clarifies my confusion!
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

803 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