+ Reply to Thread
Results 1 to 8 of 8

Run-time error '7': Out of memory

  1. #1
    Registered User
    Join Date
    10-09-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    4

    Run-time error '7': Out of memory

    I am trying to run a small script that is intended to change part of the hyperlink address of all hyperlinks in an excel sheet (there are a few hundred links that are now pointing to the wrong server, i.e. the file names will be maintaned, but the server path needs to be changed). I have tried two different scripts, both produce the same error, "Run-time error '7': Out of memory". The scripts look like this:

    Please Login or Register  to view this content.
    Both of them error in the Replace part. Anybody got an idea?

    Moderator Note:

    Pls use code tags around your code next time as per forum rules.
    Last edited by Fotis1991; 10-09-2013 at 06:55 AM.

  2. #2
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Run-time error '7': Out of memory

    the below should do the trick and not only update your actual link but also text displayed to show link
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved , to mark your thread as Solved select Thread Tools and click Mark thread as Solved.

    I can't read the mind of my wife so then I get picture but no sound .... and then I mostly get the idea, same goes here picture your outcome and I get the idea.

  3. #3
    Registered User
    Join Date
    10-09-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Run-time error '7': Out of memory

    The text displayed to show the link is only the file name, so I don't want to update that. Your code didn't give any error messages, but it didn't change any links either

    Update: It works on a small test-sheet I've made, but not in the big one... so probably something that makes it not recognizing the text to search for or similar... I'll investigate further
    Last edited by jitte; 10-09-2013 at 07:43 AM.

  4. #4
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Run-time error '7': Out of memory

    ah might be the \ i used versus the / you have
    i tested the code this time and it works fine here

    update : saw your update , now thats a bit strange
    Last edited by hulpeloos; 10-09-2013 at 07:47 AM.

  5. #5
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Run-time error '7': Out of memory

    you can use this one and see where it stops counting and last address it updated
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-09-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Run-time error '7': Out of memory

    Thanks. It stopped at counter 414, and gave the error message "Run-time error '91': Object variable or With block variable not set" on the msgbox hl.Address line, so I don't get to see the address it stops at. Your if-loop should pick out the links not having the oldpath in it, right? Just overlooking the sheet, I would say that 414 is approximately the total number of hyperlinks, and I need to change about half of them...

  7. #7
    Forum Contributor
    Join Date
    01-17-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    211

    Re: Run-time error '7': Out of memory

    it looks for the string \oldpath\ in the hyperlink address and only when it finds it with does the replace
    ctrl +mouse over still shows old link or new one ?

    if you want to get details :
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-09-2013
    Location
    Oslo
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Run-time error '7': Out of memory

    Thanks! It stopped before changing anything again, didn't even go into the if loop, which made me understand that the if loop didn't kick in at all because it couldn't find the link text. Figured out it was because of the link containing spaces, which I had copy-pasted into the code as %20, which the search string of course didn't find. Thanks for the help, I got all the links changed, and I also got to brush up a bit on my very limited VBA knowlegde

    I guess you're not all that helpless Heel erg bedankt!
    Last edited by jitte; 10-10-2013 at 06:22 AM.

+ 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] Run-time error 7: out of memory
    By gandrea in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-06-2012, 08:16 PM
  2. [SOLVED] Run-time error 7 out of memory vba
    By Jovica in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-19-2012, 09:08 AM
  3. Run-time error 7 out of memory vba
    By Macro1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-21-2010, 09:42 AM
  4. Run-time error '7': Out of memory
    By rpollard001 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2006, 04:45 PM
  5. Run-time error '7': Out of memory
    By rpollard001 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2006, 02:15 AM

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