Solved

Autolock aspect ratio?

Posted on 2011-02-15
4
1,562 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 41

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 41

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

920 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now