Justinlabenne
12-10-2004, 01:11 AM
Not sure why this keeps happening, I am trying to use DRJ's code for combining files in a folder, the example file available with the code works but if I cut and paste the code and use it in a different wb, it keeps debugging on the:
Dim Wkb As Workbook
This happens all the time when I try to declare a variable as a workbook
Why would the example file (Read-Only) run the code with no problems accurately, but then not run in any other files? Why can't I set a Workbook variable in any files I have. I read through the help files and I can;t find a reason or duplicate code or even duplicate workbook name or anything that it said to look for that may cause this. Whats the deal?
Dim Wkb As Workbook
This happens all the time when I try to declare a variable as a workbook
Why would the example file (Read-Only) run the code with no problems accurately, but then not run in any other files? Why can't I set a Workbook variable in any files I have. I read through the help files and I can;t find a reason or duplicate code or even duplicate workbook name or anything that it said to look for that may cause this. Whats the deal?