Accelerated Life Testing Analysis in Microsoft Excel - Explanation

This article explains some of the API calls in the Accelerated Life Testing Analysis in Microsoft Excel example file. For more examples, please see the Example section of the API Reference.

The functions in this example and the code structure are very similar to the Weibull++ example. After reviewing the Weibull++ example, note the following differences.

 Inside the CalculateALTA function, a "Use Stress" value is specified before running calculations. This is done by calling the ALTADataSet object's AddStressDefinition and passing a name of the stress and the value. Note that we are checking that the stress value is greater than 0 to provide a useful error message if it is not.  Dim useStress As Double useStress = ActiveSheet.Range("F3") If useStress <= 0 Then MsgBox "Enter a use stress. The use stress value must be greater than 0.", vbInformation Call ClearResults Exit Sub End If Call mALTADataSet.AddStressDefinition(ActiveSheet.Range("C2"),, useStress)

When loading the failure data from the spreadsheet, the ALTADataSet object's AddFailure subroutine includes a third parameter to pass the stress values for the failure. Note that although our sheet has only one stress column, you could add additional stress columns which is why the stress value is passed inside an array.  Dim i As Integer Dim StressArray(0) As Variant For i = 3 To ActiveSheet.Cells(ActiveSheet.Rows.count, 1).End(xlUp).Row StressArray(0) = ActiveSheet.Cells(i, 3).Value Call mALTADataSet.AddFailure(Val(ActiveSheet.Cells(i, 1).Value), _                             CLng(ActiveSheet.Cells(i, 2).Value), StressArray) Next 