zz_zz
New Member
Hi all! My first post here.
I am trying to center images in Column E and resize them to take about 90% of the cell but have padding around it. I found this VBA below from @jolivanes. It works great but I am not sure how I can resize images. Any help would be appreciated.
>>> use code - tags <<<
I am trying to center images in Column E and resize them to take about 90% of the cell but have padding around it. I found this VBA below from @jolivanes. It works great but I am not sure how I can resize images. Any help would be appreciated.
>>> use code - tags <<<
Code:
Sub Maybe()
Dim shp As Shape
For Each shp In ActiveSheet.Shapes
If shp.TopLeftCell.Column = 5 Then
With shp
.Top = Range(shp.TopLeftCell.Address).Top + ((Range(shp.TopLeftCell.Address).Height - shp.Height) / 2)
.Left = Range(shp.TopLeftCell.Address).Left + ((Range(shp.TopLeftCell.Address).Width - shp.Width) / 2)
End With
End If
Next shp
End Sub
Last edited by a moderator: