0

The question is simple, see in the photo :

I want to read two sheets of an workbook as two arrays so that I can close it and use data directly in another workbook(Main)

In the workbook itself, we can reference the sheet directly like this:

Synthese.Range("bla:bla")

instead of

Worksheets("Sythèse FGA").Range("bla:bla")

So I really just want to write a fonction to get an excel file by file dialogue, and then read two sheets into arrays so that I can close this workbook.

Of course I don't need to do like this, I just want to know if it's possible.

  • If you want to refer to a sheet in a different workbook by its codename, then perhaps see [this](https://stackoverflow.com/questions/58549008/how-can-i-get-worksheet-code-name-to-activate-a-specific-worksheet). – BigBen Oct 07 '20 at 14:48
  • @BigBen, yeah, that's what I am doing nowadays, I am just wondering. – Shengwei Li Oct 07 '20 at 15:02
  • this is a "hacky" method and comes with its own issues: https://stackoverflow.com/questions/22256536/referencing-sheets-in-another-workbook-by-codename-using-vba – Scott Craner Oct 07 '20 at 15:14
  • [THIS](https://stackoverflow.com/a/44777242/4851590) answer also explains the trust you will need to add – Scott Craner Oct 07 '20 at 15:19

0 Answers0