+ Reply to Thread
Results 1 to 3 of 3

Excel 2010 - Linked Pictures using defined names slows down macros drastically

  1. #1
    Registered User
    Join Date
    07-29-2013
    Location
    Eastern Shore, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Excel 2010 - Linked Pictures using defined names slows down macros drastically

    Looking for some help. I am an experienced user of excel, but usually have to piece-meal macros together to make them work.

    The problem I am having is that my macros (hiding empty rows in a given sheet) are slowed way down when I put a linked picture on the sheet. I am looking for some code to insert into my subs to 'turn off' the picture link in the beginning and 'turn on' the link at the end.

    My pictures are linked as follows:
    1) Photo list on separate sheet (Each picture 100% contained in a single cell).
    2) Create name for each cell for each picture. "Picture1" "Picture2" ETC.
    3) On my setup sheet, I have an IF equation to determine what cell name to display. Cell B10 =IF($A$1="x","Picture1",IF($A$2="x","Picture2",""))
    4) I then use Define Names to direct the final photo to the IF statement cell. FinalPicture =INDIRECT('SetUp'!$B$10)
    5) Finally after pasting a picture on my final sheet, I enter into the formula bar the Defined Name. =FinalPicture

    This allows me to display a different picture based on what selection is made.
    This all worked great, until I went back to use my simple macros that hid empty rows to consolidate a large list. It takes 3+ minutes to run instead of 2-3 seconds.

    Any help would be appreciated.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Excel 2010 - Linked Pictures using defined names slows down macros drastically

    regarding my suggestion in your other post change your finalpicture name to refer to a controlling cell
    =IF('Setup'!$Z$1,INDIRECT('SetUp'!$B$10))
    and then enter TRUE in Z1 on setup. when you run the code have it change Z1 to FALSE at the start of the code and then back to TRUE at the end
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    07-29-2013
    Location
    Eastern Shore, MD
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Excel 2010 - Linked Pictures using defined names slows down macros drastically

    This helped some, thank you. Your suggestion took the time from about 3 minutes down to a minute and 23 secs. I am condensing over 700 lines so I'm thinking it will take some time but it is not where I'd like it to be yet.
    Any other suggestions?

+ 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. Insert Pictures In Excel 2010
    By Hemish in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2014, 11:51 AM
  2. Application-defined or object defined error in Excel 2010 VBA
    By hsejar in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-20-2011, 04:26 AM
  3. Adding pictures into excel, linked to cell totals.
    By Harrydad57 in forum Excel General
    Replies: 3
    Last Post: 12-16-2010, 08:50 PM
  4. [SOLVED] Excel 2000 with macros slows to write to W2k3/XP disk or shares
    By Chris V. in forum Excel General
    Replies: 0
    Last Post: 05-03-2006, 02:40 AM
  5. linked pictures in Excel
    By sergiu in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 06-28-2005, 05:05 PM

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