Here is the recorded action:
SwfWindow("PRISM G2").SwfToolbar("_ProjectManagerWindow_Toolbars").PerformToolAction tbmgrRibbonTab, tbmgrClick, "Cost Management (Mar '11):Cost", "Cost Control Accounts"
When running the line, it errors out. Error:
Object reference not set to an instance of an object.
Line (82): "SwfWindow("PRISM G2").SwfToolbar("_ProjectManagerWindow_Toolbars").PerformToolAction tbmgrRibbonTab, tbmgrClick, "Cost Management (Mar '11):Cost", "Cost Control Accounts"".