I have some code that displays a form which retrieves an expression value from NX and displays it in a textbox on the form if the textbox value is changed by the user the expression value is updated to the new value. I am using this method on a bunch of expressions but the problem I am running into is when i change the value and apply it using an "Apply" Button on my form I get a message box for "Work in Progress" that never closes even after the value has updated.
Dim Exp As NXOpen.Expression = CType(workPart.Expressions.FindObject("OS_OD"), NXOpen.Expression) 'get expression
Dim ob1 As TextBox = TextBox1 'get string from textbox
Dim Val As String = MainMenu.OSA 'get expession value
If IsNumeric(Trim(ob1.Text)) = True And ob1.Text <> Exp.Value Then 'check if text box is a number and different from current value
workPart.Expressions.Edit(Exp, ob1.Text) 'expression = to TB text
Else
MsgBox("Please Enter a valid numerical value selected field", vbOK) 'error found in TB string
ob1.Select()
End If