Option Explicit

' Example parameter sweep.
'
' E29 is the input cell.
' F29 contains a formula that uses octavefn().
'
' Application.Calculate is the synchronization point. The macro does not
' continue until synchronous OctaveExcel formulas have finished calculating.

Sub OctaveParameterSweep()

    Dim x As Double
    Dim result As Variant

    For x = 0 To 10 Step 0.1

        Range("E29").Value = x

        Application.Calculate

        result = Range("F29").Value

        Debug.Print x, result

    Next x

End Sub
