Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default paste image into a form

i've been trying to get an image pasted into a form (the image is a range
from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default paste image into a form

Hi,

Have a look at Stephen Bullen's PastePicture, which contains the code
required to do this.
http://www.oaltd.co.uk/DLCount/DLCou...stePicture.zip

Cheers
Andy

Gixxer_J_97 wrote:
i've been trying to get an image pasted into a form (the image is a range
from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default paste image into a form

thanks! it worked - any ideas on how to scale the image in the clipboard to a
specific size?

i have tried using
ActiveWindow.zoom = 75
before my copy statement, but that doesn't seem to work.


"Andy Pope" wrote:

Hi,

Have a look at Stephen Bullen's PastePicture, which contains the code
required to do this.
http://www.oaltd.co.uk/DLCount/DLCou...stePicture.zip

Cheers
Andy

Gixxer_J_97 wrote:
i've been trying to get an image pasted into a form (the image is a range
from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?


--

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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default paste image into a form

Not sure the zoom will affect the captured image.

Can you not set the Image property so the picture is stretch to fit and
then resize the image control?

Cheers
Andy

Gixxer_J_97 wrote:
thanks! it worked - any ideas on how to scale the image in the clipboard to a
specific size?

i have tried using
ActiveWindow.zoom = 75
before my copy statement, but that doesn't seem to work.


"Andy Pope" wrote:


Hi,

Have a look at Stephen Bullen's PastePicture, which contains the code
required to do this.
http://www.oaltd.co.uk/DLCount/DLCou...stePicture.zip

Cheers
Andy

Gixxer_J_97 wrote:

i've been trying to get an image pasted into a form (the image is a range
from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?


--

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default paste image into a form

using the following

Image2.AutoSize = True
lPicType = IIf(obMetafile, xlPicture, xlBitmap)
Set Image2.Picture = PastePicture(lPicType)
Image2.Height = 522
Image2.Width = 450

to scale the image works - however, the image is pretty much unreadable.

any suggestions? and you were right, the zoom didn't work - i figured that
since it was taking a 'picture' it might be like the print screen key.


"Andy Pope" wrote:

Not sure the zoom will affect the captured image.

Can you not set the Image property so the picture is stretch to fit and
then resize the image control?

Cheers
Andy

Gixxer_J_97 wrote:
thanks! it worked - any ideas on how to scale the image in the clipboard to a
specific size?

i have tried using
ActiveWindow.zoom = 75
before my copy statement, but that doesn't seem to work.


"Andy Pope" wrote:


Hi,

Have a look at Stephen Bullen's PastePicture, which contains the code
required to do this.
http://www.oaltd.co.uk/DLCount/DLCou...stePicture.zip

Cheers
Andy

Gixxer_J_97 wrote:

i've been trying to get an image pasted into a form (the image is a range
from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?


--

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


--

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



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default paste image into a form

Perhaps you will need to adjust the cell sizes and their fonts before
capturing an image.

Alternatively, how about placing the image in a frame and using the
frames scrollbars to move the underlying image. Obviously the user won't
be able to see all the information at once but they will be able to read it.

Cheers
Andy

Gixxer_J_97 wrote:
using the following

Image2.AutoSize = True
lPicType = IIf(obMetafile, xlPicture, xlBitmap)
Set Image2.Picture = PastePicture(lPicType)
Image2.Height = 522
Image2.Width = 450

to scale the image works - however, the image is pretty much unreadable.

any suggestions? and you were right, the zoom didn't work - i figured that
since it was taking a 'picture' it might be like the print screen key.


"Andy Pope" wrote:


Not sure the zoom will affect the captured image.

Can you not set the Image property so the picture is stretch to fit and
then resize the image control?

Cheers
Andy

Gixxer_J_97 wrote:

thanks! it worked - any ideas on how to scale the image in the clipboard to a
specific size?

i have tried using
ActiveWindow.zoom = 75
before my copy statement, but that doesn't seem to work.


"Andy Pope" wrote:



Hi,

Have a look at Stephen Bullen's PastePicture, which contains the code
required to do this.
http://www.oaltd.co.uk/DLCount/DLCou...stePicture.zip

Cheers
Andy

Gixxer_J_97 wrote:


i've been trying to get an image pasted into a form (the image is a range

from a worksheet)

i think i have the copy down, but i can't get it pasted into the form

image2 exists on the form and is empty

Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap
seems to copy ok - as i tried pasting by hand into paint and the correct
range is there

however, i can't get the image2 to display this.
ExistingWO is the name of the form
and image2 is the empty image control on the form

what did i miss?


--

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


--

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


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
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
Form image taxman Excel Worksheet Functions 0 August 30th 07 04:32 AM
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
Display Worksheet image on a form Dave Taylor[_4_] Excel Programming 0 November 18th 04 10:10 AM
Help! Animated gif-image in form does not show animation when form loaded JoCa Excel Programming 4 September 23rd 04 07:43 PM
resizing an image on a form Liam[_2_] Excel Programming 1 November 14th 03 10:06 PM


All times are GMT +1. The time now is 07:14 PM.

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

About Us

"It's about Microsoft Excel"