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.