+ Reply to Thread
Results 1 to 8 of 8

"Out Of Memory Error" when not out of memory

  1. #1
    Registered User
    Join Date
    12-21-2019
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    5

    "Out Of Memory Error" when not out of memory

    For whatever reason I keep getting an "Out of Memory Error" whenever I attempt to execute it. if I remove the GetItemsNames for the inventory it dosent throw the error but even if I debug.print anything it will throw the error. The laptop I'm using isn't new by any means but it has 6GB of Ram and is a 64bit OS. Not only that but the memory dosent even spike when I run the code. Its using 20mb at max. Is it a problem with my VBA Structure? I'm fairly new to VBA but it doesn't seem like I should be running out of memory with such little actually happening. Not only that but the files the code is opening are only 4 or 5 rows. This must be an issue with excel itself or the execution of the code. I have two macro buttons. One to execute the SelectFolder function and one for the GrabMobeItems.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: "Out Of Memory Error" when not out of memory

    What do you want to do with statement ?
    Please Login or Register  to view this content.
    - Battle without fear gives no glory - Just try

  3. #3
    Registered User
    Join Date
    12-21-2019
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    5
    Quote Originally Posted by PCI View Post
    What do you want to do with statement ?
    Please Login or Register  to view this content.
    The basic idea was to go through each file in a selected file folder and then read every populated row in A, take the value of each cell and add it to a list so i can later xonoare it with the current list that this VBA is executing from. That way I could later run a for to change data based on the name of the cell that matches between the ThisWorkbook and the ones im opening

  4. #4
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: "Out Of Memory Error" when not out of memory

    But here, you are using twice the same variable ...FSOFile as object in FSOFile ... no ??
    You should use FSOFolder .. no ?

  5. #5
    Registered User
    Join Date
    12-21-2019
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    5
    Quote Originally Posted by PCI View Post
    But here, you are using twice the same variable ...FSOFile as object in FSOFile ... no ??
    You should use FSOFolder .. no ?
    I changed it to FSOFolder.Files, however i still get a out of memory error

  6. #6
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,097

    Re: "Out Of Memory Error" when not out of memory

    Is there a file you can attach to reproduce the issue ???

  7. #7
    Registered User
    Join Date
    12-21-2019
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    5

    Re: "Out Of Memory Error" when not out of memory

    I do but unfortunately I haven't, "posted enough. I cant post dropbox links or upload files

  8. #8
    Registered User
    Join Date
    12-21-2019
    Location
    Alberta, Canada
    MS-Off Ver
    2010
    Posts
    5

    Re: "Out Of Memory Error" when not out of memory

    All it is is a workbook in which this vba code executes. The select folder selects a folder in which workbook files are. then it loops through all files in that folder and reads all occupied rows in A.

+ 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. Macro runs successfully but displays "Out of Memory" error at end
    By nobodyukno in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-22-2017, 10:37 AM
  2. [SOLVED] Macro gets "Run time error '7' out of memory" for ReDim Array
    By capson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-10-2014, 12:52 PM
  3. Replies: 1
    Last Post: 07-06-2014, 04:20 PM
  4. [SOLVED] "not enough memory" error on workbook.save , but not .close(SaveChanges:=True)
    By sylvainsylvain in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-18-2013, 12:08 PM
  5. Every Error Message from VBA is coming back as "Out of Memory", while it is not!
    By TopXorGuy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2013, 10:57 PM
  6. "Not Enough memory to display" error when dropdown values in combo are selected
    By pabs1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-10-2012, 02:49 PM
  7. excell 2000 is giving an error "not enough memory"
    By 3Dbesh in forum Excel General
    Replies: 1
    Last Post: 02-08-2005, 08:06 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