Excel Macro to auto position images

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,
LVL 4
urthrilledAsked:
Who is Participating?
 
Rgonzo1971Connect With a Mentor Commented:
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
 
urthrilledAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.