This is a more advanced concept where you're managing multiple workbooks aka Excel Files.
Prerequisites This code is needed when you're processing more than 1 workbook. Whenever you run VBA code by opening a spreadsheet it refers to ThisWorkBook. To reference a specific workbook you could reference it by it's name. Note that there is an issue with New Window command. So with in the workbook you're referencing a sheet called "xxxx" and within that sheet you're referencing a range name. So if you open a new workbook and want to retrieve a value from another workbook, this is the command you'd execute. Note that in this example you could have also used ThisWorkBook.Sheets("xxxx").Range("DER_cc") Not that the range name means DER = DEployment Report and cc is the cc on an email. |