ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Store an image inside a cell? (https://www.excelbanter.com/excel-worksheet-functions/65719-store-image-inside-cell.html)

tx12345

Store an image inside a cell?
 

Can a small GIF or JPG image be stored inside of a cell, or somehow
otherwise associated with it?



Many Thx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=502228


Elkar

Store an image inside a cell?
 
There are a couple different ways you could do this. The first would be to
select "Insert" from the menu bar and then "Picture", then "From File".
Select your GIF or JPG and then resize and place on your sheet where you
want. If you right-click on that picture, and then select "Format Picture"
then go to the "Properties" Tab, you can set it to move with cells. Thus it
won't really be associated with any particular cell, but its positioning will
stay relative to the cell you've place it on.

The second method would be to insert a Comment into the cell. Select
"Insert" from the menu bar, then "Comment". This creates a little balloon
window that appears whenever you move the mouse over that cell. Then go back
to the "Insert" menu and select "Edit Comment". Delete any text that is in
the Comment Window then click the outer edge of the comment (so you are no
longer editing the text within). Then right-click the edge and select
"Format Comment". Then select the "Colors and Lines" Tab and for Fill Color
choose "Fill Effects..." Then select the "Picture" tab and choose your
picture file.

HTH,
Elkar

"tx12345" wrote:


Can a small GIF or JPG image be stored inside of a cell, or somehow
otherwise associated with it?



Many Thx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=502228



tx12345

Store an image inside a cell?
 

The cell comment idea was perfect.

Many Thx!


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=502228


tx12345

Store an image inside a cell?
 

I had another related question

I can manually get the pic into the comment but when I try to use a
macro to automate the process it keeps getting hung up. I recorded the
following in the exact order:


Code:
--------------------

Sub adpic()

Range("M9").AddComment
Range("M9").Comment.Visible = False
Range("M9").Comment.Text Text:=" :" & Chr(10) & ""
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Fill.BackColor.SchemeColor = 80
Selection.ShapeRange.Fill.UserPicture "C:\1m.jpg"

End Sub
--------------------


but it keeps getting hung up he


Code:
--------------------
Selection.ShapeRange.Fill.Transparency = 0#
--------------------


when I try to execute the macro. Have any ideas?


Thx


--
tx12345
------------------------------------------------------------------------
tx12345's Profile: http://www.excelforum.com/member.php...o&userid=24776
View this thread: http://www.excelforum.com/showthread...hreadid=502228



All times are GMT +1. The time now is 03:47 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com