Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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





  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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







  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
enter bitmap image pixel data to cells Larry Shindel, MA, REEGT New Users to Excel 0 January 9th 09 03:06 AM
Saving clipboard image as BMP through VBA in Excel Elliot Excel Discussion (Misc queries) 0 September 17th 08 03:22 AM
Strange behaviour - loading Excel clears Clipboard Trevor Shuttleworth Excel Discussion (Misc queries) 1 August 19th 06 10:04 PM
Image not loading when opening Workbook wadein Excel Discussion (Misc queries) 1 April 12th 06 01:53 PM
Putting an image into the clipboard Jonathan Crow Excel Programming 2 September 12th 03 12:06 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"