Hello all.
I require a little guidance on how to centre an image within 2 merged cells the code I have been using to centre an image in one cell does not work for 2 cells. No matter how I try I just cant get it to work.
Is there a way to alter the code to allow for this. See bellow for the code I am using:
I require a little guidance on how to centre an image within 2 merged cells the code I have been using to centre an image in one cell does not work for 2 cells. No matter how I try I just cant get it to work.
Is there a way to alter the code to allow for this. See bellow for the code I am using:
Code:
Public Sub FitImagetoCell()'Insert Picture to Cell and Centre
On Error GoTo NOT_SHAPE
With Selection
.Left = .TopLeftCell.Left + (.TopLeftCell.Width - .Width) / 2
.Top = .TopLeftCell.Top + (.TopLeftCell.Height - .Height) / 2
End With
Exit Sub
NOT_SHAPE:
MsgBox "Select a picture."
End Sub