Hi Ash K,
Code below will align
all images centre with the centre of cell 'G4'.
VBA Code:
Sub ChangeAllPics()
Dim s As Shape
Dim ws As Worksheet
Dim ColWidth As Single
Dim RowHeight As Single
For Each ws In ActiveWorkbook.Worksheets
For Each s In ws.Shapes
ColWidth = Range("G4").Offset(0, 1).Left - Range("G4").Left
RowHeight = Range("G4").Offset(1, 0).Top - Range("G4").Top
s.LockAspectRatio = msoFalse
s.Width = 65
s.Height = 65
s.Left = (Range("G4").Left + (ColWidth / 2)) - (s.Width / 2)
s.Top = (Range("G4").Top + (RowHeight / 2)) - (s.Height / 2)
Next s
Next
End Sub
Or... do you need to align images to the centre of different cells? See my image below.
View attachment 116175
This code will align each image in to the next cell of a given column.
In the code below change where I have 'G' to the column you need and the start row (4 below) to the first row to align the picture to. Example below starts in cell 'G4' and then goes to the next row for each sheet.
VBA Code:
Sub ChangeAllPics2()
Dim s As Shape
Dim ws As Worksheet
Dim ColWidth As Single
Dim RowHeight As Single
Dim Counter As Integer
Dim AlignCol As String
AlignCol = "G" 'Change 'G' to column needed
For Each ws In ActiveWorkbook.Worksheets
Counter = 4 'Start row number, change '4' to the row to start at
For Each s In ws.Shapes
ColWidth = Range(AlignCol & Counter).Offset(0, 1).Left - Range(AlignCol & Counter).Left
RowHeight = Range(AlignCol & Counter).Offset(1, 0).Top - Range(AlignCol & Counter).Top
s.LockAspectRatio = msoFalse
s.Width = 65
s.Height = 65
s.Left = (Range(AlignCol & Counter).Left + (ColWidth / 2)) - (s.Width / 2)
s.Top = (Range(AlignCol & Counter).Top + (RowHeight / 2)) - (s.Height / 2)
Counter = Counter + 1
Next s
Next
End Sub