I want to paste an image from clipboard to an excel cell using vba.
i could find a code like this :
If My.Computer.Clipboard.ContainsImage() Then
Dim grabpicture = My.Computer.Clipboard.GetImage()
PictureBox1.Image = grabpicture
End If
but here grabpicture variable is an object. how to update a cell from an image object.
like this,
Sheet1.Range("D11").Value = grabpicture
Pictures are not inserted into cells. Pictures are inserted onto the sheet and then may be aligned so that the top left corner visually matches top left corner of some cell.
To insert a picture from the clipboard, you use
Sheet1.Paste().