ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Locking picture in cell (https://www.excelbanter.com/excel-discussion-misc-queries/171234-locking-picture-cell.html)

Cathy

Locking picture in cell
 
I am trying to create an inventory in Excel using a small picture of the item
in the first column and other columns have the create date, inventory number,
price, etc. When I sort all, I lose the positioning of the inventory picture
with the row. How do I lock the pic with the row?

Gord Dibben

Locking picture in cell
 
Size the object so it fits entirely within the cell boundaries.

Format all pictures to "move and size with cells".


Gord Dibben MS Excel MVP


On Tue, 1 Jan 2008 12:46:00 -0800, Cathy
wrote:

I am trying to create an inventory in Excel using a small picture of the item
in the first column and other columns have the create date, inventory number,
price, etc. When I sort all, I lose the positioning of the inventory picture
with the row. How do I lock the pic with the row?



Cathy

Locking picture in cell
 
OMG!! You are a genius! Some of my images were over the cell boundary lines
so when I experimented with the format picture, it still got displaced when I
sorted. I will make sure in the future to make the images smaller than the
cell. Is there a way to set that as the default for all images inserted in to
this document?

Thank you so very much!!

"Gord Dibben" wrote:

Size the object so it fits entirely within the cell boundaries.

Format all pictures to "move and size with cells".


Gord Dibben MS Excel MVP


On Tue, 1 Jan 2008 12:46:00 -0800, Cathy
wrote:

I am trying to create an inventory in Excel using a small picture of the item
in the first column and other columns have the create date, inventory number,
price, etc. When I sort all, I lose the positioning of the inventory picture
with the row. How do I lock the pic with the row?




Gord Dibben

Locking picture in cell
 
I can't think of code to write to default all inserted images to a particular
size. Too late at night for an old geezer.

I can supply a macro to resize all selected images to a certain size.
Experiment with the 12# and 24# to adjust height and width.

Placement of these images would be up to you.

Sub Reset_Shapes()
Dim shp As Shape
On Error GoTo whoops
For Each shp In ActiveSheet.Shapes
With Selection.ShapeRange
.LockAspectRatio = msoFalse
.Height = 12#
.Width = 24#
.Rotation = 0#
End With
Next shp
Exit Sub
whoops:
MsgBox "You have not selected any picture(s)"
End Sub


Gord

On Tue, 1 Jan 2008 19:40:00 -0800, Cathy
wrote:

OMG!! You are a genius! Some of my images were over the cell boundary lines
so when I experimented with the format picture, it still got displaced when I
sorted. I will make sure in the future to make the images smaller than the
cell. Is there a way to set that as the default for all images inserted in to
this document?

Thank you so very much!!

"Gord Dibben" wrote:

Size the object so it fits entirely within the cell boundaries.

Format all pictures to "move and size with cells".


Gord Dibben MS Excel MVP


On Tue, 1 Jan 2008 12:46:00 -0800, Cathy
wrote:

I am trying to create an inventory in Excel using a small picture of the item
in the first column and other columns have the create date, inventory number,
price, etc. When I sort all, I lose the positioning of the inventory picture
with the row. How do I lock the pic with the row?






All times are GMT +1. The time now is 05:09 PM.

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