How can i have imacro take the value from 'position #1' then performing some calculation using this VB code

Code: Select all

```
Function TSPrice(Cost As String) As Integer
Dim vCost As Double
Dim vCostRoundUp As Double
Dim vCostAdded As Double
If IsNumeric(Cost) Then
vCost = val(Cost)
vCostRoundUp = Round_Up(vCost)
If vCostRoundUp > 1000 Then
vCostAdded = vCostRoundUp + (vCostRoundUp * 0.12) + 20
Else
vCostAdded = vCostRoundUp + (vCostRoundUp * 0.14) + 10
End If
TSPrice = Round_Down(vCostAdded)
Else
MsgBox ("Cost Must Be Numeric")
End If
End Function
Function Round_Up(ByVal d As Double) As Integer
Dim result As Integer
result = Math.Round(d)
If result >= d Then
Round_Up = result
Else
Round_Up = result + 1
End If
End Function
Function Round_Down(ByVal d As Double) As Integer
Dim result As Integer
result = Math.Round(d)
If result >= d Then
Round_Down = result - 1
Else
Round_Down = result
End If
```

Any help will be appreciated

i'm using iMacros for Firefox 9.0.3

Windows 10 PRO

Firefox 52.0.1 (32-bit)