Solved

Excel Macro to auto position images

Posted on 2014-03-12
2
271 Views
Last Modified: 2014-03-12
The requirement is a macro to put the focus on an inserted image on a worksheet, run a macro to have it position to always have the top left of the image positioned at the top left of the printed worksheet.

I asked why pushing it to the top left of the worksheet doesn't work for them and the answer I got was that it wasn't precise.

Thank you,
0
Comment
Question by:urthrilled
2 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
Hi,

the macro place the selected picture at the topleft of the worksheet

Sub Macro()

Set s = Selection
If TypeName(s) = "Picture" Then
    s.Top = 0
    s.Left = 0
    s.TopLeftCell = "A1"
End If
End Sub

Open in new window

Regards
0
 
LVL 4

Author Comment

by:urthrilled
Comment Utility
Thank you, I set it up and it worked to the requirements I was given, still not sure why pushing it to the top left didn't work for him, but I think this is what he asked for.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to transfer Notes from Outlook 2010 to OneNote 2016 16 99
changePi Challenge 15 75
endX challenge 2 48
recursion example 16 66
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will shed light on the latest trends when it comes to your resume building needs. For far too long, the traditional CV format has monopolized the recruitment market.
This video walks the viewer through the process of creating envelopes and labels, with multiple names and addresses. Navigate to the “Start Mail Merge” button in the Mailings tab: Follow the step-by-step process until asked to find the address doc…
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…

762 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

9 Experts available now in Live!

Get 1:1 Help Now