If i enter the following excel function in a cell and press enter, it works:
"=T_DisplayReport(A1)"
but if I write the following in VBA:
Sheets("Sheet1").Cells(1, 1).Formula = "=T_LoadReport(""X"",""Y"",true)"
Sheets("Sheet1").Cells(1, 1).Calculate
Sheets("Sheet1").Cells(2, 1).Formula = "=T_DisplayReport(A1)"
Sheets("Sheet1").Cells(2, 1).Calculate
it doesnt work. How can I hardcode the cell A1 into the above VBA so that it is recognised and the function works?
EDIT: A1 contains another function which fetches data and saves it to the local cache. T_DisplayReport() grabs cell A1 to then display this data.
MsgBox Application.Evaluate("=DisplayReport(A1)")=T_DisplayReport(A1)works in the Excel cell andMsgBox Application.Evaluate("=T_DisplayReport(A1)")doesn't then there is not much I can suggest without seeing the function...