Others

Change the Excel File Path in a Microsoft Access Import Macro

Bushra ParveenBushra Parveen Nov 20, 2026 868 views

Question details

Change the Excel file path used by an Access import macro.

Change the Excel File Path in an Access Import Macro
Product
Microsoft Access
Device & OS
not provided
Scenario
An Access database imports an Excel file from a former employee's computer and needs to use a current local or shared network location.
Observed behavior
The macro references an Excel file path on the former employee's computer.
Before you start

Locate the Excel file and copy its full path, including the file name and extension. If others run the macro, confirm that they can access the chosen shared folder.

Solution 1Recommended

Edit the Excel file path in Access Macro Design View

Use this method when an Access macro contains the outdated path in its import action.

Access macros are edited in Access, not in the VBA editor. The import action may be named ImportExportSpreadsheet or TransferSpreadsheet, depending on the Access version.

1
Find the macro

Open the database in Access. In the Navigation Pane, expand the Macros group and find the macro that imports the Excel file.

2
Open Design View

Right-click the macro and select Design View.

3
Update the file path

Find the spreadsheet import action and replace the old path in its File Name field with the full path to the Excel file. For a shared folder, use an accessible network path such as \\server\share\folder\file.xlsx.

4
Save and test

Save the macro, then run it from the Navigation Pane or its usual button. Confirm that the expected Excel data is imported.

Edit the Excel file path in Access Macro Design View
Shared database access: Each person who runs the import needs access to the network folder. If the path is supplied by an expression or configuration setting rather than entered directly in File Name, update that source instead.
Free Microsoft Office alternative

Work with Excel Import Files in WPS Office

WPS Office is a free, lightweight alternative for working with spreadsheet files in a familiar interface. Open and edit Excel-format files in WPS Spreadsheets as you move between Office applications; use Microsoft Access to edit and run the database macro.

Review and edit spreadsheet data before importing it into AccessOpen and save Microsoft Excel formats, including XLSXUse a familiar spreadsheet interface with common editing toolsWork in a lightweight office suite available for free
microsoft office alternative - wps office

Frequently Asked Questions

Should I edit the import macro in the VBA editor?

No. For an Access macro, right-click the macro in the Navigation Pane and select Design View. VBA procedures are edited separately in the VBA editor.

What path should I use if several people run the import?

Use a shared network location that all users can access, such as \\server\share\folder\file.xlsx. Enter the full path in the import action's File Name field.

What if I cannot find the old path in the macro action?

Check whether the File Name field contains an expression or refers to a stored setting. Update the referenced source rather than replacing an unrelated field.

Can WPS Office change or run the Access macro?

Use Microsoft Access to edit and run the macro. WPS Spreadsheets can help you review or edit the Excel file that the macro imports.