0

I have a Userform in CATIA Macros that includes a listbox. The listbox contains calculated data, and these calculations are updated when the user clicks the "preview" button. However, if the user changes the input data and clicks the button again, the listbox becomes empty. I'm wondering why this happens and if there is a way to fix it.

If sumTHK <> 0 Then

   ' calcRLcm = calcRL1
    numX0 = Format(calcRL1, "###0.00")
    numLi = Format(calcRL2, "###0.00")
    If UserForm1.ChBoxShow = True Then
     UserForm1.ListBox2.AddItem
     UserForm1.ListBox2.List(m, 0) = A
     UserForm1.ListBox2.List(m, 1) = k
     UserForm1.ListBox2.List(m, 2) = j
     UserForm1.ListBox2.List(m, 3) = GeoThick
     UserForm1.ListBox2.List(m, 4) = numX0
    ' UserForm1.ListBox2.List(m, 4) = numLi
     m = m + 1

     A = A + 1
     
     End If
Else
    calcRLcm = 0
End If

there is my code which the list filled up

 
Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73
Salome
  • 1
  • 2

0 Answers0