+ Reply to Thread
Results 1 to 5 of 5

Enlarge small Pictures with a click (assign a Macro to a picture)

  1. #1
    Registered User
    Join Date
    08-23-2016
    Location
    Slovenia
    MS-Off Ver
    2010
    Posts
    9

    Enlarge small Pictures with a click (assign a Macro to a picture)

    Hello,

    What I would like to have:
    I have a table, where in every row - next to the information - there is picture that helps descripe the situation better.
    The pictures can be quite large (up to 1000x1500 px) so I want to make them fit in a 50x50 cell by manually reducing their size (not the file size or resolution, just a thumbnail)

    So, to make them big again (not necessarily original size , just bigger), I've found a macro that does just that - and it places the picture on top.

    Please Login or Register  to view this content.

    The problem I have with it;

    If I have multiple picture, I would assign the same macro to them all.
    But, if I want to enlarge another picture afterwards (while the first one stays big), the macro instead of enlarging it, makes it even smaller (that is probably logical as the macro does that).

    So, is there a way around? How can I achieve the "enlarge just pictures that are small and make small just the ones that are large"?
    The macro should be some kind of a loop... enlarge/make small - from the inserted original size to the manually created "thumbnail" size.

    Any comments or suggestions would be welcomed.
    Thanks.

  2. #2
    Registered User
    Join Date
    08-23-2016
    Location
    Slovenia
    MS-Off Ver
    2010
    Posts
    9

    Re: Enlarge small Pictures with a click (assign a Macro to a picture)

    No suggestions? Any at all?
    Would really appreciate your help, as this would save me a lot of stress in my daily excel work.

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Enlarge small Pictures with a click (assign a Macro to a picture)

    You need to retain the name of the shape that was enlarged in order to shrink it.

    put this in a code module
    Please Login or Register  to view this content.
    and this in the worksheet code module of the sheet that has the pictures on it.

    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

  4. #4
    Registered User
    Join Date
    08-23-2016
    Location
    Slovenia
    MS-Off Ver
    2010
    Posts
    9

    Re: Enlarge small Pictures with a click (assign a Macro to a picture)

    Hi Andy,
    thank you very much, this works great. Even better then I first imagined

    Just one more question; can I somehow replace the definition by how much (e.g. -50, + 50) with "enlarge to original" and make small to predefined (by how much I manually made it small)?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434

    Re: Enlarge small Pictures with a click (assign a Macro to a picture)

    You should be able to enlarge to original by resetting the picture.
    In order to make small to specified size you would need to store that size in variables. Then reapply them when the shape is reduced.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 7
    Last Post: 10-05-2016, 06:02 PM
  2. Enlarge a picture using VBA
    By geliedee in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-25-2015, 11:54 AM
  3. Click on picture and run macro to replace existing picture with selected picture file
    By houseflipsheet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2014, 12:02 AM
  4. Replies: 1
    Last Post: 05-16-2011, 08:07 AM
  5. [SOLVED] My Excel Sheet that worked fine for months opens small without controls to enlarge
    By Christian Blackburn in forum Excel General
    Replies: 4
    Last Post: 06-28-2006, 04:35 PM
  6. Macro to enlarge a picture
    By WightRob in forum Excel General
    Replies: 10
    Last Post: 06-07-2006, 02:08 AM
  7. Enlarge picture in a cell comment, PLZZ some advise
    By KostasH in forum Excel General
    Replies: 1
    Last Post: 04-07-2006, 09:55 AM

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