Hi,
The default pasting of picture in a Excel sheet is terrible:
Picture should always paste in the cell and move, resize and even delete with a cell!
Now they sometimes paste at the location of a cell without belonging to that cell. Sometimes they past at the top and aren't even selected after pasting
You can solve this with following code, only you lose the redo/undo:
So my question is: How can I manipulate the clipboard to make the picture as if it is already changed as a cell-related picture, before the natural pasting starts and thereby keeping the undo/redo?
Is there a way to use Application.OnKey "^{v}", "onKeyCtrlV" though let it execute his own paste after changing the clipboard?
And how do I change the picture in the clipboard to the activecell size with xlMoveAndSize?
thanks
The default pasting of picture in a Excel sheet is terrible:
Picture should always paste in the cell and move, resize and even delete with a cell!
Now they sometimes paste at the location of a cell without belonging to that cell. Sometimes they past at the top and aren't even selected after pasting
You can solve this with following code, only you lose the redo/undo:
VBA Code:
If TypeName(Selection) = "Picture" Then
Selection.Placement = xlMoveAndSize
Selection.ShapeRange.LockAspectRatio = True
Selection.Height = Selection.TopLeftCell.Height - 4
Selection.Top = ActiveCell.Top + 2
Selection.Left = ActiveCell.Left + 2
End If
Is there a way to use Application.OnKey "^{v}", "onKeyCtrlV" though let it execute his own paste after changing the clipboard?
And how do I change the picture in the clipboard to the activecell size with xlMoveAndSize?
thanks