Hello,
After two days of googling (since om still a beginner) I have yet not found a solution to this (probably easy to solve) problem.
I will firstly try to explain the problem and afterward the whole idea of the solution (if anyone wants to comment).
I am trying to copy values from two sheets in an external workbook to a "Total" sheet in the same external workbook.
That is, I want to add the values from "A1"/Sheet 1 and "A1"/Sheet 2" to "A1"/Sheet "Total"
I tried using something like this:
Windows("import.xls").activate
However, even though the file import.xls is open, I get an error "Index is out of interval" (Translated but hopefully right).
I need to be able to switch back and forth between the opened workbooks but failed finding a way obviously, so hopefully someone here knows what command to use.
The goal:
I got x amount of files, all which are sent to my from different people.
All files have different numbers of sheets.
All sheets look the same though.
I want to add these matrices up to a total per person.
Once that is done, I want to add them up again with a "mega" total.
These totalts + the mega total should be stored in the master and easily be updated if the import files change.
The master also have a few graphs which uses the imported data.
The solution I am trying to build is:
Create a temp sheet within every importfile
Create the total
Copy the total over to the master
Close all importfiles
Create the mega total in the master.
Thanks
Linus
After two days of googling (since om still a beginner) I have yet not found a solution to this (probably easy to solve) problem.
I will firstly try to explain the problem and afterward the whole idea of the solution (if anyone wants to comment).
I am trying to copy values from two sheets in an external workbook to a "Total" sheet in the same external workbook.
That is, I want to add the values from "A1"/Sheet 1 and "A1"/Sheet 2" to "A1"/Sheet "Total"
I tried using something like this:
Windows("import.xls").activate
However, even though the file import.xls is open, I get an error "Index is out of interval" (Translated but hopefully right).
I need to be able to switch back and forth between the opened workbooks but failed finding a way obviously, so hopefully someone here knows what command to use.
The goal:
I got x amount of files, all which are sent to my from different people.
All files have different numbers of sheets.
All sheets look the same though.
I want to add these matrices up to a total per person.
Once that is done, I want to add them up again with a "mega" total.
These totalts + the mega total should be stored in the master and easily be updated if the import files change.
The master also have a few graphs which uses the imported data.
The solution I am trying to build is:
Create a temp sheet within every importfile
Create the total
Copy the total over to the master
Close all importfiles
Create the mega total in the master.
Thanks
Linus