+ Reply to Thread
Results 1 to 3 of 3

VBA help to move and resize a picture from one cell to another

  1. #1
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Exclamation VBA help to move and resize a picture from one cell to another

    I have a macro to insert a photo into a specific area (J11 - M17) which works perfectly. What I need to do now is possibly insert another picture which requires to move , resize and centre to a different cell (G11 - H17). The code to insert the picture from a file is
    Sub Insert_Pict_1()
    Please Login or Register  to view this content.
    I tried this the code below which sort of works but depending on which ratio of picture is used, it resizes outside of the range required
    Please Login or Register  to view this content.
    Some advise would be appreciated
    Last edited by arlu1201; 06-26-2013 at 05:59 AM. Reason: Use code tags in future.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: VBA help to move and resize a picture from one cell to another

    Change .lockaspectratio to false?

    Edit: or if you want to keep lockaspectratio on I guess you need something like:
    Please Login or Register  to view this content.
    Last edited by ragulduy; 06-26-2013 at 06:08 AM.

  3. #3
    Registered User
    Join Date
    02-14-2013
    Location
    wales
    MS-Off Ver
    Excel 2010
    Posts
    64

    Re: VBA help to move and resize a picture from one cell to another

    Awesome - Many thanks, changing aspect ratio to false did not work just squashed photo but the second option works perfectly

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1