Picture the same size as a cell

N

Nater

Hi I am new to programming and I was just wondering how to make a .jp
image the same size as a cell? I know that you can not insert
picture into the acctual cell i just want it the same size. Also i
there a way to use the compress image feature in excel through VBA?
Thanks in advance :
 
T

Tom Ogilvy

the basic approach is

Sub SizePicture()
Set shp = ActiveSheet.Shapes(1)
With Cells(5, 4)
shp.Top = .Top
shp.Left = .Left
shp.Width = .Width
shp.Height = .Height
End With
End Sub

You may have to look at the aspect ratio settings.
 
N

Nater

Thanks with a bit of tweaking i got what i wanted. Still cant figur
out the compression though
 
Top