Hello,
I've written a VBA macro that allows me to perform an automatic data retrieval on daily basis from a PI Server using Excel's add-on "PI DataLink". Within my spreadsheet, certain columns get populated with arrays from PI DataLink while others are formulas that simply need to be copied down daily as new PI data gets retrieved into the spreadsheet. However, when I execute the code, I receive the following error: "Application-defined or object-defined error" after the code activates my "Prod Allocation" worksheet and attempts to select a certain row. The error occurs at the following command: Workbooks("Voidage Replacement & Production Allocation.xlsm").Sheets("Prod Allocation").Range(Cells(i - 2, 8), Cells(i - 2, 122)).Select
I've checked the code and verified the worksheet name dozens of times to ensure there is not a spelling error, and I'm unable to figure out why the code fails on selecting a certain line. Could you please help me resolve this issue? The code is shown in full below. Not sure if this is relevant, but all coding was done in Excel 2010.
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Bookmarks