Solved

Inserting Image and Text into the same Excel Box

Posted on 2014-01-16
2
270 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
[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 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Suggested Solutions

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

738 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