View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Keramidas Gary Keramidas is offline
external usenet poster
 
Posts: 2,494
Default Macro for multiple worksheets

untested, but have you tried this

ws.DrawingObjects.Select
instead of
ActiveSheet.DrawingObjects.Select



--


Gary


"Amber" wrote in message
oups.com...
Any help would be appreciated. I have a workbook with several
spreadsheets that contain small picture files. Each time I open the
workbook I would like a macro to run on each worksheet and resize the
files to a specific size. The code I have so far is below. It only
resizes the images on the worksheet that is active when opening the
document. What am I missing?

Thanks!
---------------------------------------------

Sub Auto_Open()

Dim ws As Worksheet

For Each ws In Worksheets
ActiveSheet.DrawingObjects.Select
With Selection
.ShapeRange.LockAspectRatio = msoTrue
.ShapeRange.Height = 21#
.ShapeRange.Width = 24.75
.ShapeRange.Rotation = 0#
.Placement = xlMove
.PrintObject = True
End With
Next ws

End Sub