AUTOMATED COPY from one workbook to another

  • Thread starter Thread starter Skip
  • Start date Start date
S

Skip

How can I automate a copy from a "read only" workbook to my
workbook? When I try to open the original workbook from my
macro, I recieve "run-time error 9: subscript out of
range". I have tried to use Import, but there are alphas
in a numeric field. In this case, the cells with alphas
show up as blank and are unusable.
 
You may want to post the snippet of code that breaks (indicate which line is
messing up, too).

But when I see subscript errors, it's usually a misspelling of the worksheet
name or the workbook name. Out of range means that whatever array/collection is
being used doesn't have that thing in it.

worksheets("sheeet1").copy ...
would cause that error if I really wanted "sheet1" (and sheeet1 didn't exist!)

Same with worksheets(3).copy... if the workbook had less than 3 worksheets.
 
Thanks Dave,
I know that I do not have typos in the name. If the original workbook is open, the code works just fine. However, I need this to run every Monday morning at a time when I am not there to open the original workbook. For a copy command to work, they both have to be open. The original can be closed for an import command, but I can't do that because of the data. I have also tried to use scheduled tasks to open the original one minute before opening the copy workbook and running its macro, but the macro still could not find the original workbook.
 
Back
Top