ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Problem with a complex Macro (https://www.excelbanter.com/excel-discussion-misc-queries/227963-problem-complex-macro.html)

Jamie

Problem with a complex Macro
 
I have a macro that follows a file path and once it gets to the end, it finds
every excel file in that folder and opens each one. As it opens each one it
copies and pastes data from a specific sheet and cell or range of cells into
a new workbook. I use this macro to gather data at the end of each month. I
have started using it throughout the month to get different data from the
same workbooks. I'll just go into the macro and change the file path, sheet,
or cell that I need. The Problem.... I have a specific workbook that this
will not work on. The macro goes thru all the motions but in the end it
leaves me with a blank excel sheet instead of a sheet with all the pasted
data.

Gary''s Student

Problem with a complex Macro
 
First remove any OnError traps to allow errors to become visible.
--
Gary''s Student - gsnu200846


"Jamie" wrote:

I have a macro that follows a file path and once it gets to the end, it finds
every excel file in that folder and opens each one. As it opens each one it
copies and pastes data from a specific sheet and cell or range of cells into
a new workbook. I use this macro to gather data at the end of each month. I
have started using it throughout the month to get different data from the
same workbooks. I'll just go into the macro and change the file path, sheet,
or cell that I need. The Problem.... I have a specific workbook that this
will not work on. The macro goes thru all the motions but in the end it
leaves me with a blank excel sheet instead of a sheet with all the pasted
data.


Jamie

Problem with a complex Macro
 
No dice. No errors present. Everything runs the way it's supposed to it
just leaves me with a blank worksheet. This particular workbook that I'm
having trouble using this macro on does contain a few macros of its own,
could that be a problem? The other ones I use it on also contain macros, but
not to the extent that the trouble one does.

"Gary''s Student" wrote:

First remove any OnError traps to allow errors to become visible.
--
Gary''s Student - gsnu200846


"Jamie" wrote:

I have a macro that follows a file path and once it gets to the end, it finds
every excel file in that folder and opens each one. As it opens each one it
copies and pastes data from a specific sheet and cell or range of cells into
a new workbook. I use this macro to gather data at the end of each month. I
have started using it throughout the month to get different data from the
same workbooks. I'll just go into the macro and change the file path, sheet,
or cell that I need. The Problem.... I have a specific workbook that this
will not work on. The macro goes thru all the motions but in the end it
leaves me with a blank excel sheet instead of a sheet with all the pasted
data.



All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com