+ Reply to Thread
Results 1 to 7 of 7

Overflow error, long processing time

  1. #1
    Registered User
    Join Date
    03-14-2014
    Location
    NL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Overflow error, long processing time

    I have a column with image names. For example; image.jpg.

    I want the code to convert the image name to a clickable hyperlink. When i1 is set as integer, I will get an Overflow error. Changed it to Long and now it works. However, it takes about 2 minutes for the code to complete the operation and the sheet is inaccessible.

    I only have a few images in my sheet so I do not understand why it would take a couple of minutes to convert to a hyperlink. Any ideas?

    Please Login or Register  to view this content.
    Last edited by nokia6100; 03-24-2014 at 10:09 AM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Overflow error, long processing time


    Hi,

    you forgot to swith off the display before the loop to speed up the procedure !
    See VBA help of ScreenUpdating property …

    A good code doesn't use Goto

    But it's not necessary to create hyperlink to open / view a file !
    Easier way is to control a double click event for example …
    Attach an example workbook without any hyperlink, just the column of file name,
    and I could post a code example …
    Last edited by Marc L; 03-24-2014 at 07:42 AM.

  3. #3
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Overflow error, long processing time

    I will also suggest you use .Value property rather than .Text which may be slow if you have a lot of rows.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  4. #4
    Registered User
    Join Date
    03-14-2014
    Location
    NL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Talking Re: Overflow error, long processing time

    book.zip

    Here is my file attached.

    Thank you for helping. I hope you can make it better

  5. #5
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Cool Try this !


    Just by a double click on the file name without any hyperlink on the cell,
    if the cell is in column B and the file exists in the same workbook's path,
    code to insert directly in the Sheet1 worksheet module class (not a standard one) :
    Please Login or Register  to view this content.

    Another Way :
    Please Login or Register  to view this content.

    Last but not least …
    Please Login or Register  to view this content.
    Enjoy !
    Last edited by Marc L; 03-24-2014 at 09:45 AM. Reason: mod second code

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Lightbulb Variant of the first code :

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    03-14-2014
    Location
    NL
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Overflow error, long processing time

    Superb!

    I used your second option. It works well

+ 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. [SOLVED] =IF and =SUMIF formulas creating long long long data processing times.
    By comp in forum Excel Programming / VBA / Macros
    Replies: 32
    Last Post: 03-26-2014, 02:59 PM
  2. Overflow Error 6 with Long variable type
    By ThermalTD in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-05-2013, 08:26 AM
  3. Overflow error when using MID on long string
    By MacroMan! in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-03-2011, 01:54 PM
  4. Overflow Error: Number larger than Long
    By rishadjb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-22-2009, 04:08 AM
  5. Run-time error '6': Overflow
    By magoobee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-16-2006, 12:54 PM

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