(Solved) – How do I use a String object as an index for an Excel Workbook?

(solved)-–-how-do-i-use-a-string-object-as-an-index-for-an-excel-workbook?

I have the names of Excel files I want to open in an array. Can I use those String objects as the workbook index?

For example:

nameText = "Revenue.xlsx"

Set myValues = Workbooks(nameText).Worksheets(1).Columns("J")

I believe I’m running into a problem with
Workbooks(nameText) — what can I do to make that work?

Leave a Reply

Your email address will not be published. Required fields are marked *