Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
that would work - however the end users of this program aren't the most
computer literate of folk. i was hoping to have it all in one view rather than scrolling around. the fonts are at 10 and the cells are already as small as they can be - which is why i was hoping to scale the image down somehow. i could make the image larger, but i'm designing on a 21" mon running at 16 x 12 and the users are on a 17" at 8x6 and 10x7 - so making it larger will cause them more problems for visibility. i'll try the frame / scrollbar approach and see if that will do. thanks!! "Andy Pope" wrote: 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 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Gixxer,
that would work - however the end users of this program aren't the most computer literate of folk. i was hoping to have it all in one view rather than scrolling around. the fonts are at 10 and the cells are already as small as they can be - which is why i was hoping to scale the image down somehow. i could make the image larger, but i'm designing on a 21" mon running at 16 x 12 and the users are on a 17" at 8x6 and 10x7 - so making it larger will cause them more problems for visibility. i'll try the frame / scrollbar approach and see if that will do. Image scaling will work best with metafiles rather than bitmaps, so: Worksheets("work order").Range("b2:l51").CopyPicture xlScreen, xlBitmap would be better as ...CopyPicture xlScreen, xlMetafile and PastePicture(xlMetafile) Regards Stephen Bullen Microsoft MVP - Excel www.oaltd.co.uk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Form image | Excel Worksheet Functions | |||
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. | Links and Linking in Excel | |||
Display Worksheet image on a form | Excel Programming | |||
Help! Animated gif-image in form does not show animation when form loaded | Excel Programming | |||
resizing an image on a form | Excel Programming |