+ Reply to Thread
Results 1 to 3 of 3

vba to insert jpeg and re-size to cell range excel 2007

  1. #1
    Registered User
    Join Date
    05-28-2013
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    2

    vba to insert jpeg and re-size to cell range excel 2007

    Hi,
    This is my first post so appologies for any mistakes made
    I have been using the code below to insert jpeg images into my workbook unlock aspect ratio and resize and insert into cell range, BL2:BP14.
    The image inserts and re-sizes but is inserted at cell B4 and not BL2 top left corner.
    I'm sure this has something to do with ActiveSheet.Pictures.Insert as we recently upgraded from 2003 to 2007.
    Please can you help to resolve this problem as it has been driving me mad for a while now i cant seem to get anything to work. I'm quite new to programming.
    Thank you in advance for any answers
    Mark


    Please Login or Register  to view this content.
    Last edited by markberry1; 05-29-2013 at 07:42 AM.

  2. #2
    Valued Forum Contributor tehneXus's Avatar
    Join Date
    04-12-2013
    Location
    Hamburg, Germany
    MS-Off Ver
    Work: MS-Office 2010 32bit @ Win8 32bit / Home: MS-Office 2016 32bit @ Win10 64bit
    Posts
    944

    Re: vba to insert jpeg and re-size to cell range excel 2007

    Hi,

    I just tested this with Excel 2013 and it works fine. As the picture is inserted into the ActiveCell I think their might be the problem. You can set the position of the picture with:
    Please Login or Register  to view this content.
    below this line:
    Please Login or Register  to view this content.
    Please use [CODE]-TAGS
    When your problem is solved mark the thread SOLVED
    If an answer has helped you please click to give reputation
    Read the FORUM RULES

  3. #3
    Registered User
    Join Date
    05-28-2013
    Location
    england
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: vba to insert jpeg and re-size to cell range excel 2007

    Thanks tehneXus

    That works perfect !

    The jpeg is inserted in the correct place and it re-sizes to suit the shape of the range however i adjust it

    Thanks again, this was driving me mad !

    Mark

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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