Solved

Excel Macro to auto position images

Posted on 2014-03-12
2
278 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 49

Accepted Solution

by:
Rgonzo1971 earned 500 total points
ID: 39924230
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
ID: 39924315
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Suggested Solutions

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
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…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

773 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