Insert No linked picture in the cell with formatting VBA

  • I found the difficulties to find the right approach in Excel HOW I can to format inserted object (picture) with line borders and colors etc.


  • Re: Insert No linked picture in the cell with formatting VBA


    I am not sure if you mean the shape or the cell in the topleft. This shows how to work with both objects.

  • Re: Insert No linked picture in the cell with formatting VBA


    Nice idea to define as shape but I mean this picture in the cell. Macro works but it doesnt stretch with the cell (LockAspectRatio) as it's when pic variable define as picture. And here I am stuck.

  • Re: Insert No linked picture in the cell with formatting VBA


    Select is the easiest way handle some of things that you want.


    If you need to get a pic's dimensions to resize before your AddPicture, I can show you a method or two.

  • Re: Insert No linked picture in the cell with formatting VBA


    Seems I found the solution. Thank you for your help.:thumbcoo:


    I wrote the following lines:


    Code
    With pic
                .LockAspectRatio = msoFalse
                .Placement = xlMoveAndSize
            End With


    AND gotcha. :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!