Go Back   Access World Forums > Microsoft Access Discussion > Reports

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-17-2018, 08:55 AM   #1
Jupie23
Newly Registered User
 
Join Date: Nov 2017
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Jupie23 is on a distinguished road
Export report to Excel-subscript out of range

I have a report for work that has 2 subreports. The report is a list of names, with the number of calls they took, the number of errors they had, and their error ratio for the week. I made a button with a macro to export the report to Excel so the numbers can be copied and pasted to other spreadsheets. It is working well. I made a copy of the report and it's 2 subreports, and switched everything over to the appropriate queries to do the same thing for another team. Everything is exactly the same except each team is on a different table. The second report will open and show the correct data, but when I try to export to Excel I get "subscript out of range." and then Access shuts down. It will export to Word or as a text file with no problem, and the data doesn't have anything weird in it. Any thoughts on what could be going on and how to fix it?

Jupie23 is offline   Reply With Quote
Old 04-17-2018, 09:54 AM   #2
arnelgp
Registered User
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 6,348
Thanks: 54
Thanked 2,029 Times in 1,942 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Export report to Excel-subscript out of range

What code did you use in macro OutputTo or TransferSpreadsheet? Use transferspreadsheet if you can do it in macro do it in vba.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
Old 04-17-2018, 11:14 AM   #3
Jupie23
Newly Registered User
 
Join Date: Nov 2017
Posts: 34
Thanks: 5
Thanked 0 Times in 0 Posts
Jupie23 is on a distinguished road
Re: Export report to Excel-subscript out of range

I have attached a screenshot of the macro. I have the exact same thing for the other report and it is working well. This one is giving me the error and shutting down Access. Thank you!
Attached Images
File Type: jpg Capture.JPG (27.5 KB, 14 views)

Jupie23 is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Subscript of Range in Report Wizard HIMANSHU Reports 4 09-11-2013 01:55 AM
Subscript out of range in Excel worksheet Danielf Modules & VBA 6 09-10-2013 11:59 PM
subscript out of range? multiple table report? alphadawg Reports 5 01-04-2013 10:39 AM
Error 9 Subscript Out Of Range when copying records from form (datasheet) to Excel panchitocarioca Modules & VBA 10 02-24-2010 03:00 PM
Export error "Subscript out of range" DevKumar Reports 4 03-19-2004 03:24 AM




All times are GMT -8. The time now is 04:56 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World