Reference a Worksheet in Another Excel Instance with VBA
Question details
Access a specific worksheet in Update.xlsb from VBA running in Master.xlsb when the files are open in separate Excel instances.

- Product
- Microsoft Excel VBA
- Device & OS
- not provided
- Scenario
- A macro creates a separate Excel application and opens Update.xlsb while Master.xlsb remains in the original instance.
- Observed behavior
- The macro cannot reliably reference the target workbook or worksheet in the separate Excel instance.
Confirm the full path to Update.xlsb and the exact name of its target worksheet. The example assumes the macro is stored in Master.xlsb and that both workbooks have a worksheet named Report.
Store explicit references to the Excel application, workbook, and worksheet
Use the objects returned when you create the second Excel instance and open its workbook, rather than relying on the active workbook.
Each Excel instance has its own workbooks collection. Explicit references keep the macro connected to the intended workbook and worksheet in each instance.
In Master.xlsb, open the Visual Basic Editor and select the module containing your macro.
Adapt this example with the actual path and sheet names: Sub ReadUpdateSheet() Dim xlApp As Excel.Application Dim updateWb As Excel.Workbook Dim updateWs As Excel.Worksheet Dim masterWs As Excel.Worksheet Set masterWs = ThisWorkbook.Worksheets("Report") Set xlApp = CreateObject("Excel.Application") Set updateWb = xlApp.Workbooks.Open("C:\Path\Update.xlsb", ReadOnly:=True) Set updateWs = updateWb.Worksheets("Report") masterWs.Range("A1").Value = updateWs.Range("A1").Value updateWb.Close SaveChanges:=False xlApp.Quit Set updateWs = Nothing Set updateWb = Nothing Set xlApp = Nothing Set masterWs = Nothing End Sub
Run the macro from the VBA editor and check cell A1 on the Report sheet in Master.xlsb. Replace the example cell references with the data you need.

Work with spreadsheets in WPS Office
WPS Office is a free, lightweight alternative with a familiar interface for opening and editing spreadsheets. It supports common Excel formats for easier migration, but it does not fix Excel's cross-instance VBA references; verify workbook and macro compatibility before switching.

Frequently Asked Questions
Why doesn't ActiveWorkbook reliably identify Update.xlsb?
ActiveWorkbook depends on the active workbook in an Excel instance. Save the result of xlApp.Workbooks.Open in a variable such as updateWb, then use updateWb.Worksheets("Report").
How do I reference the workbook containing the macro?
Use ThisWorkbook in the VBA module to refer to the workbook containing the code. For example, ThisWorkbook.Worksheets("Report") selects its Report sheet.
Can I transfer a cell value between the two instances?
Yes. Once you have worksheet references in both instances, assign a value directly, for example: masterWs.Range("A1").Value = updateWs.Range("A1").Value.
How do I prevent the second Excel instance from remaining open?
Close the workbook with updateWb.Close and call xlApp.Quit when you are finished. Add an error-handling cleanup section so these actions also run if the macro fails.




