Dim ThisComponent Set ThisComponent = GetThisComponent() 'Total number of iterations in the project TotalNoIter = 10 'File name with complete path where the resuts have to be stored fName = "D:\DOCUMENTS\PROJECT\POWER_METER_RESULT.txt" Dim FSO Dim outFile Dim resMgr Dim res Dim iter Dim val Dim textPrint Set FSO = CreateObject("Scripting.FileSystemObject") Set outFile = FSO.CreateTextFile(fName, True) Set resMgr = ThisComponent.GetResultMgr Set res = resMgr.GetObjectByName("Total Power (dBm)") textPrint = "" For iter = 1 To TotalNoIter val = res.GetValue(iter) textPrint = textPrint + CStr(val) + vbCrLf Next outFile.WriteLine (textPrint) outFile.Close