Thank you for copying this thread to vCampus.
From the PI DataLink Manual (2010 and later 4.2.x page 83):
Note that VBA does not recognize PI DataLink functions, but you can formulate a function as a text string, and then set the formula Array property of a range of cells to the text string value. The VBA code can then check the cell values for the PI function results. This yields the same results as manual entry of PI functions in the same range of cells.
Here is an example I took from a TechSupport call:
Cells(1, 1).Value = "sinusoid" Cells(1, 2).Value = "localhost" Cells(2, 2).Formula = "=PICurrVal($A$1, 0,$B$1)"