Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a vb macro that automatically places several jpg image on a worksheet
and rescales then to fit in boxes on the page. This macro has worked well until we upgraded to 2007. Does anyone know if there has been a change in syntax. Here is the current vb code: Sub InsertPICS(PicPath As String, PicWidth As Integer, PicTop As Integer, PicLeft As Integer) Dim ScaleRatio As Single ActiveSheet.Pictures.Insert(PicPath).Select Selection.Name = "3DPic" ScaleRatio = PicWidth / Selection.Width With Selection .ShapeRange.ScaleWidth ScaleRatio, msoFalse, msoScaleFromTopLeft .ShapeRange.ScaleHeight ScaleRatio, msoFalse, msoScaleFromTopLeft .Left = PicLeft .Top = PicTop End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Unselect shaperange object after drawing it with VBA? | Excel Programming | |||
Excel 2007 Problems | Excel Discussion (Misc queries) | |||
Problem setting RGB Values with ShapeRange | Excel Programming | |||
Selection.ShapeRange.IncrementLeft error | Excel Programming | |||
Selection.ShapeRange.IncrementLeft error | Excel Programming |