Cells outside the range of cells defined in spreadsheet

Glenn_Suggs

New Member
Joined
Aug 9, 2012
Messages
13
Hi all. Can someone please help with this problem? I have a code module in Access that runs a query that produces a one-record table and that record contains a total. Then the code runs this on an Excel Spreadsheet:

DoCmd.TransferSpreadsheet acExport, 8, "TOTAL_TABLE", "SpreadsheetName", False, "GrandTotals!A1:A2" (A1 now contains the field name and A2 contains the total value.)

That part was in place when I took over the project. Now I was asked to add a line for a different item type which is a subset of the original total. I copied the query above and made the new one to produce the total of the subset. It produces the total just fine, but when I duplicate the TransferSpreadsheet part like this:

DoCmd.TransferSpreadsheet acExport, 8, "TOTAL_SUBSET", "SpreadsheetName", False, "GrandTotals!A3:A4"

I get "Error# 3673. This table contains cells that are outside the range of cells defined in this spreadsheet." Does anyone have any ideas about how to fix this? I think it's an Excel error even though Access VBA initiated the process. Maybe I'm wrong.

Thanks in advance,
Glenn
 

Some videos you may like

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result

Watch MrExcel Video

Forum statistics

Threads
1,123,229
Messages
5,600,420
Members
414,383
Latest member
kevinlarey

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top