VBA & Macro Problems

How to Fix Object Required Error When Parsing JSON in Access VBA

Khadija KhanKhadija Khan Nov 3, 2026 868 views

Question details

The user encounters a Runtime Error 424 'Object Required' when attempting to parse a JSON API response using JSONConverter.ParseJson in Access VBA.

How to Fix Object Required Error When Parsing JSON in Access VBA
Product
Microsoft Access
Device & OS
not provided
Scenario
Parsing an API response in Access VBA to display the JSON data in a list box or insert it into a table.
Observed behavior
The VBA code throws an 'Object Required' error at the JSONConverter.ParseJson step, preventing the data from being parsed and displayed.
Before you start

Ensure that you have downloaded the latest version of the VBA-JSON project from GitHub and that your Access database has a reference enabled for Microsoft Scripting Runtime.

Solution 1Recommended

Reimport the JSONConverter Module and Declare Objects Correctly

Resolve the missing or corrupted module issue by completely removing and cleanly reimporting the JSONConverter.bas file.

The 'Object Required' error (Runtime Error 424) during JSON parsing often occurs if the JSONConverter module is incomplete, corrupted during import, or improperly referenced. Reimporting the clean .bas file ensures VBA can recognize the ParseJson function correctly.

1
Remove Existing Module

Open the VBA Editor (ALT + F11). In the Project Explorer, right-click the existing 'JSONConverter' module and select 'Remove JSONConverter'. Choose 'No' when asked to export it.

2
Reimport JSONConverter.bas

Right-click anywhere in the Project Explorer, select 'Import File', and navigate to the clean 'JSONConverter.bas' file you downloaded from the VBA-JSON GitHub repository. Click 'Open' to import it.

3
Declare and Set the Object

In your VBA code, explicitly declare your JSON variable as an Object using 'Dim Json As Object'. Ensure you use the Set keyword to assign the parsed response: 'Set Json = JSONConverter.ParseJson(reader.responseText)'.

4
Verify in Immediate Window

Before binding the data to a list box, use 'Debug.Print Json.Count' to inspect the parsed data in the Immediate window (CTRL + G) to confirm the parse was successful.

Reimport the JSONConverter Module and Declare Objects Correctly
Reference Check: Make sure 'Microsoft Scripting Runtime' is checked under Tools > References in the VBA Editor, as the VBA-JSON parser relies heavily on the Scripting.Dictionary object.
Free Microsoft Office alternative

Looking for a Lightweight Alternative to Microsoft Office?

While Microsoft Access is a specialized database tool, many everyday office tasks like data analysis, reporting, and document creation do not require heavy database software. WPS Office provides a free, lightweight suite that is fully compatible with Microsoft formats, making it perfect for your daily productivity needs.

  1. 1. Download WPS Office: Visit the official WPS Office website and click the free download button for your operating system.
  2. 2. Install the Suite: Run the downloaded installer file and follow the on-screen prompts to complete the lightweight installation.
  3. 3. Open and Edit Files: Launch WPS Office to instantly open, edit, and save your existing Microsoft Office documents seamlessly.
Fully compatible with Microsoft Excel (.xlsx), Word (.docx), and PowerPoint (.pptx) formats.Built-in advanced Spreadsheets application with robust data handling and macro capabilities.Free to download and use with a familiar, easy-to-navigate user interface.Lightweight installation that runs smoothly on Windows, Mac, Linux, iOS, and Android.
microsoft office alternative - wps office

Frequently Asked Questions

Why do I get Runtime Error 424 'Object Required' in Access VBA?

This error occurs when VBA expects an object but receives something else or nothing. In the context of JSON parsing, it usually means the JSONConverter module is missing, incorrectly imported, or the 'Set' keyword was omitted when assigning the parsed JSON to a variable.

How do I add VBA-JSON to my Access database?

Download the VBA-JSON project from its official GitHub repository, extract the files, open your Access VBA Editor, and use the 'Import File' option to add the 'JSONConverter.bas' module to your project. Don't forget to enable the Microsoft Scripting Runtime reference.

How can I test if my JSON API response is parsed properly before adding it to a list box?

Open the Immediate Window in the VBA Editor (CTRL + G) and use 'Debug.Print' to output specific values or the count of items in your parsed JSON object. This allows you to verify the data structure without running the full list box binding code.