ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   loading a bitmap into an image control from the clipboard (https://www.excelbanter.com/excel-programming/292914-loading-bitmap-into-image-control-clipboard.html)

Loane Sharp

loading a bitmap into an image control from the clipboard
 
Hi there.

In code, can I load a bitmap into an image control from the clipboard?

I've stored the bitmap onto the clipboard in code as follows:

ActiveSheet.ChartObjects("Chart 1").CopyPicture xlScreen, xlBitmap

Normally, I would load a bitmap from a file as follows:

UserForm1.Image1.Picture = LoadPicture(pathname).

Can anyone help?
Thanks,
Loane






Bob Phillips[_6_]

loading a bitmap into an image control from the clipboard
 
Loaned,

Does this not work?

ActiveSheet.Paste

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Loane Sharp" wrote in message
...
Hi there.

In code, can I load a bitmap into an image control from the clipboard?

I've stored the bitmap onto the clipboard in code as follows:

ActiveSheet.ChartObjects("Chart 1").CopyPicture xlScreen, xlBitmap

Normally, I would load a bitmap from a file as follows:

UserForm1.Image1.Picture = LoadPicture(pathname).

Can anyone help?
Thanks,
Loane








Andy Pope

loading a bitmap into an image control from the clipboard
 
Hi Loane,

Check out Stephen Bullen's PastePicture example, it requires some quite
complex code and API usage.
(http://www.bmsltd.ie/Excel/Default.htm)

Or a maybe an alternative approach, especially if you are after placing
a chart on a userform, from John Walkenbach.
(http://www.j-walk.com/ss/excel/tips/tip66.htm)

Cheers
Andy

Loane Sharp wrote:
Hi there.

In code, can I load a bitmap into an image control from the clipboard?

I've stored the bitmap onto the clipboard in code as follows:

ActiveSheet.ChartObjects("Chart 1").CopyPicture xlScreen, xlBitmap

Normally, I would load a bitmap from a file as follows:

UserForm1.Image1.Picture = LoadPicture(pathname).

Can anyone help?
Thanks,
Loane






--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info


Loane Sharp

loading a bitmap into an image control from the clipboard
 
Hi Andy,
Thanks very much ... working perfectly.
Cheers,
Loane

"Andy Pope" wrote in message
...
Hi Loane,

Check out Stephen Bullen's PastePicture example, it requires some quite
complex code and API usage.
(http://www.bmsltd.ie/Excel/Default.htm)

Or a maybe an alternative approach, especially if you are after placing
a chart on a userform, from John Walkenbach.
(http://www.j-walk.com/ss/excel/tips/tip66.htm)

Cheers
Andy

Loane Sharp wrote:
Hi there.

In code, can I load a bitmap into an image control from the clipboard?

I've stored the bitmap onto the clipboard in code as follows:

ActiveSheet.ChartObjects("Chart 1").CopyPicture xlScreen, xlBitmap

Normally, I would load a bitmap from a file as follows:

UserForm1.Image1.Picture = LoadPicture(pathname).

Can anyone help?
Thanks,
Loane






--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info




Loane Sharp

loading a bitmap into an image control from the clipboard
 
Hi Bob,
Thanks very much for the tip.
Cheers,
Loane

"Bob Phillips" wrote in message
...
Loaned,

Does this not work?

ActiveSheet.Paste

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Loane Sharp" wrote in message
...
Hi there.

In code, can I load a bitmap into an image control from the clipboard?

I've stored the bitmap onto the clipboard in code as follows:

ActiveSheet.ChartObjects("Chart 1").CopyPicture xlScreen, xlBitmap

Normally, I would load a bitmap from a file as follows:

UserForm1.Image1.Picture = LoadPicture(pathname).

Can anyone help?
Thanks,
Loane











All times are GMT +1. The time now is 08:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com