Solved

Autolock aspect ratio?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…

705 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

12 Experts available now in Live!

Get 1:1 Help Now