0

Hi I am relatively new to coding VBA and I am getting an out of memory error that I wasn't previously getting in the 8ish months I have been using this code. I hope someone can help me diagnose how to fix this.

I have Power Query table in an Excel spreadsheet that filters a different table for a specific Index number using a List Box of Client Names.

The first table has 3 columns:

Index Attribute Value
1 Attribute 1 Value A
1 Attribute 2 Value B
2 Attribute 1 Value C
2 Attribute 2 Value D
3 Attribute 1 Value E
3 Attribute 2 Value F

I used a list box which has a list of client names, which when selected, updates a table. So if I selected Client 1 in the list box, the table would update to say:

Attribute Value
Attribute 1 Value A
Attribute 2 Value B

The code to update this table is pretty simple and I haven't had any issues with it until recently.

ActiveWorkbook.Worksheets("Sheet Name").ListObjects("Table_Name").QueryTable.Refresh BackgroundQuery:=False

I have recently started getting Error 7 Out of memory, especially when I let the spreadsheet sit. When I hit 'Debug', it always highlights this section of code. I am not sure how to go about diagnosing what is causing this issue. I have read the documentation from Microsoft, but am not sure where to start troubleshooting this for my own situation.

2
  • 3
    Which version of Excel/Office, and which OS (Mac/Win) ? How long/soon before the problem shows itself? Commented yesterday
  • 1
    the problem is most probably not with your VBA code, but likely caused by Power Query code and the data together (looks like an infinite loop is triggered). Please share your power query code. Commented yesterday

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.