G
Gixxer_J_97
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?
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?