thanks, I used the scriptcontrol and it worked well.
The input data is not actually stored in the database, just the caption to prompt for data
I first replaced the text using replace. anyway here is some code
Private Sub cmdCalculate_Click()
y = 0
z = 0
For y = 1 To txtOutputFormula.Count - 1
For z = 1 To Text1.Count - 1
'startpos = InStr(1, txtOutputFormula(y).Text, "[" & Text1(z).Tag & "]")
'If startpos > 0 Then
tempstr = Replace(txtOutputFormula(y).Text, "[" & Text1(z).Tag & "]", Text1(z).Text)
MsgBox tempstr
txtOutputFormula(y).Text = tempstr
'End If
'MsgBox "[" & Text1(z).Tag & "]"
Next z
Next y
For p = 1 To txtResult.Count - 1
txtResult(p).Text = ScriptControl1.Eval(txtOutputFormula(p))
txtResult(p).Visible = True
Next p
End Sub
Enter your message below
Sign in or Join us (it's free).