View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Broadband-Al[_2_] Broadband-Al[_2_] is offline
external usenet poster
 
Posts: 2
Default Resizing of picture different in run time and design time

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