View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
gki[_4_] gki[_4_] is offline
external usenet poster
 
Posts: 1
Default Size Format of Images in Worksheets

Hello All,

I hope that I would get an answer to this request.

I have a userform with a command button to see the print preview; Onc
I click it, I can get all my information to the worksheet together wit
the picture.

However I cannot resize the picture on worksheet since picture size
changes from one id number to another..... Sometimes I get smal
pictures and sometimes bigger. Then it is so difficult for me to figur
out an standard size per picture.


Is there any solution that can help me out???

Private Sub cmdprintd_Click()
Static comp As Object
Dim rngCell As Range
Application.ScreenUpdating = False
Dim px As Picture
For Each px In Sheets("Sheet1").Pictures
px.Delete
Next px
Sheets("Sheet1").Activate
Range("BG405:BJ417").Select
Set rngCell = ActiveCell
Set comp = ActiveSheet.Pictures.Insert("PathName"))

comp.Top = rngCell.Top
comp.Left = rngCell.Left



Application.ScreenUpdating = True
On Error GoTo 0

Sheets("Sheet1").Range("BD401").Value = txtcode.Value


Me.Hide
Sheets("Sheet1").PrintPreview
Me.Show

End Sub


Thank you

:confused

--
Message posted from http://www.ExcelForum.com