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
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