LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default Picture resizing

Hi all and thanks for your help thus far!

here's what i want to do:
1) take a picture of a range of a worksheet
2) put that picture in a user form
3) resize the picture so that it fits in the form
4) and with #3 done be sure that the picture is still readable

here's what i've done

#1,2,and 3

#4 is what i'm having problems with.

i can resize the picture, however it is no longer readable.
i have tried with a frame and using the scroll bars but that will not work
for my end users.

the code below uses the PastePicture sub (By Stephen Bullen) suggested to me.

<begin vb code

'need to do this o/w copy doesn't get anything
Application.ScreenUpdating = True

Dim fName As String, filePath As String
Dim lPicType As Long


fName = "" & workOrderNumber & ".xls"
filePath = "./orders/" & fName

Workbooks.Open filePath

' using this copy with xlPicture doesn't get anything either (pastes
empty)
Worksheets("Work Order").Range("b12:l51").CopyPicture xlScreen, xlBitmap

Image2.AutoSize = True

lPicType = IIf(obMetafile, xlPicture, xlBitmap)
Set Image2.Picture = PastePicture(lPicType)
Image2.PictureSizeMode = fmPictureSizeModeZoom

Image2.Height = 227
Image2.Width = 285

Workbooks(fName).Close SaveChanges:=True
ExistingWO.Show
<end vb code

(the height and width were chosen as 1/3 the size of the image)

any thoughts on where to go from here to get the range scaled down properly
and have it readable?
 
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
Connect a number to a picture bank and import that picture to exce Dennis Hedo Excel Discussion (Misc queries) 1 March 22nd 10 02:17 PM
insert a picture in to a comment but picture not save on hard disk Pablo Excel Discussion (Misc queries) 0 February 21st 07 03:48 PM
resizing a picture to fit a single cell HELP erical Excel Discussion (Misc queries) 2 January 4th 07 08:51 AM
Resizing cells in a selection without resizing entire sheet Danielle via OfficeKB.com Excel Discussion (Misc queries) 4 August 11th 06 10:06 PM
How to stop Excel2002 auto resizing picture in header from templat lee Setting up and Configuration of Excel 0 December 15th 05 04:41 AM


All times are GMT +1. The time now is 02:33 AM.

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"