B
Broadband-Al
Very odd. I have a simple macro to resize all the pictures on a page in
order to fit the page breaks. It works perfectly when I step through the
code, line by line using "F8" but if I leave it to run from a command button
on the sheet, the pictures do resize but to a completely different dimension
than instructed.
After resetting pagebreaks, the code is simply a for next loop with:
AcvtiveSheet.Shapes(i).Select
With Selection
.ShapeRange.LockAspectRatio = msoTrue
.ShapeRange.Height = ht
.ShapeRange.Top = yposn
.ShapeRange.Left = xposn
End With
order to fit the page breaks. It works perfectly when I step through the
code, line by line using "F8" but if I leave it to run from a command button
on the sheet, the pictures do resize but to a completely different dimension
than instructed.
After resetting pagebreaks, the code is simply a for next loop with:
AcvtiveSheet.Shapes(i).Select
With Selection
.ShapeRange.LockAspectRatio = msoTrue
.ShapeRange.Height = ht
.ShapeRange.Top = yposn
.ShapeRange.Left = xposn
End With