[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1809
  • Last Modified:

Autolock aspect ratio?

Hey experts,

When I insert images in excel, the aspect ratio is not locked by default. It was, but it aren't anymore.

How do I change the default setting, so that whenever I insert a picture or the like, the aspect ratio is locked by default?

Excel 2007 on Windows.

Regards, Raahaugen
0
Raahaugen
Asked:
Raahaugen
  • 2
  • 2
1 Solution
 
dlmilleCommented:
Right click on your picture and select Size And Properties.  There's a checkbox for locking aspect ratio.

See picture:

Enjoy!
lock picture tipDave
0
 
RaahaugenAuthor Commented:
Hey dimille,

The problem is not to turn the lock on and off. The problem is to make it turned on as the default setting when inserting images in excel?

It used to be the default setting, but somehow it was turned off.

Maybe a solution is to run a macro every time a image is inserted?
0
 
dlmilleCommented:
Selection.ShapeRange.LockAspectRatio = msoTrue

is the VBA command line if the picture is selected.

My settings have LockAspectRatio as True all the time, and I'm searching for defaults.

In leiu of that, here's a macro as one solution.  It locks aspect ratio on all shapes in the active sheet


Sub AutoLockAllPictures()
Dim myShape As Shape

    For Each myShape In ActiveSheet.Shapes
        myShape.LockAspectRatio = msoTrue
    Next myShape
    
End Sub

Open in new window

0
 
RaahaugenAuthor Commented:
Thanks for your assistance. Sorry for being late closing the q.

Regards
Raahaugen
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now