Solved

Autolock aspect ratio?

Posted on 2011-02-15
4
1,590 Views
Last Modified: 2012-05-11
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
Comment
Question by:Raahaugen
  • 2
  • 2
4 Comments
 
LVL 42

Expert Comment

by:dlmille
ID: 34902892
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
 

Author Comment

by:Raahaugen
ID: 34904075
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
 
LVL 42

Accepted Solution

by:
dlmille earned 500 total points
ID: 34912246
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
 

Author Closing Comment

by:Raahaugen
ID: 35107097
Thanks for your assistance. Sorry for being late closing the q.

Regards
Raahaugen
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will show you how to use shortcut menus in the Access run-time environment.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question