+ Reply to Thread
Results 1 to 3 of 3

Running out of resources

  1. #1
    Registered User
    Join Date
    09-24-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Running out of resources

    I have an excel workbook that I have a number of ActiveX command buttons to run macros. After using the macros a number of times I get "Excel cannot complete this task with available resources. Choose less data or close other applications" when trying to open another workbook. What do I need to put into my macros to release resources when the macro ends.

  2. #2
    Valued Forum Contributor AlvaroSiza's Avatar
    Join Date
    09-19-2007
    Location
    Staffordshire
    MS-Off Ver
    2007
    Posts
    591

    Re: Running out of resources

    Really tough to know without the code. Can you post it? VBA inherently releases resources upon code termination, so unless something is coded uniquely to be retained, most virtual memory is cleared.

    What's your system configuration?
    Perhaps it was the Noid who should have avoided me...
    If you are satisfied with my solution click the small star icon on the left. Thanks
    1. Make a copy of your workbook and run the following code on your copy (just in case)
    2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
    3. Paste the code from above into the empty white space. Close the VBE.
    4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".

  3. #3
    Registered User
    Join Date
    09-24-2012
    Location
    Brisbane, Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Running out of resources

    Here goes, this is my first time so bear with me if I don't quite get it right

    I will include one of the macros as it is typical of the macros in the workbook. The macros are either adding or deleting rows, formatting them and adjusting formulas that run 'through' or 'over' them

    firstly initial definitions
    Please Login or Register  to view this content.

    Please Login or Register  to view this content.
    Not the most elegant of coding, but I am a novice. there is certainly room for breaking it down to use branching to subroutines or function

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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