Re: paste image into a form
From: Gixxer_J_97 (GixxerJ97_at_discussions.microsoft.com)
Date: 02/08/05
- Next message: Tom Ogilvy: "Re: Run macro in another workbook"
- Previous message: Chip Pearson: "Re: Run macro in another workbook"
- In reply to: Andy Pope: "Re: paste image into a form"
- Next in thread: Andy Pope: "Re: paste image into a form"
- Reply: Andy Pope: "Re: paste image into a form"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Feb 2005 07:17:05 -0800
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/DLCount.asp?file=PastePicture.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 work***)
> >>>
> >>>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
>
- Next message: Tom Ogilvy: "Re: Run macro in another workbook"
- Previous message: Chip Pearson: "Re: Run macro in another workbook"
- In reply to: Andy Pope: "Re: paste image into a form"
- Next in thread: Andy Pope: "Re: paste image into a form"
- Reply: Andy Pope: "Re: paste image into a form"
- Messages sorted by: [ date ] [ thread ]