S
Sai
I am trying to copy a range as a picture from excel and paste that into a
picturebox on a form.
The code I am using to copy is
Globals.Profiles.Range("ProfileChart").CopyPicture(Excel.XlPictureAppearance.xlScreen,
Excel.XlCopyPictureFormat.xlPicture)
to paste the chart into a picturebox I first tried
Me.PictureBox1.Image = Clipboard.GetImage
That did not work and then I tried
Me.PictureBox1.Image =
DirectCast(Clipboard.GetDataObject().GetData(DataFormats.Bitmap, False),
Bitmap)
that did not work either.
I can paste the bitmap into any other application like word, excel or
outlook. When I query clipboard.containsimage I get false.
Please help !!!!!
picturebox on a form.
The code I am using to copy is
Globals.Profiles.Range("ProfileChart").CopyPicture(Excel.XlPictureAppearance.xlScreen,
Excel.XlCopyPictureFormat.xlPicture)
to paste the chart into a picturebox I first tried
Me.PictureBox1.Image = Clipboard.GetImage
That did not work and then I tried
Me.PictureBox1.Image =
DirectCast(Clipboard.GetDataObject().GetData(DataFormats.Bitmap, False),
Bitmap)
that did not work either.
I can paste the bitmap into any other application like word, excel or
outlook. When I query clipboard.containsimage I get false.
Please help !!!!!