This is tested in a ListBox_AfterUpdate() event. Get a handle on the ListBox object (assigned to variable lb) then iterate the items in the lb.List, checking if each is selected. If selected, then assign a positional value to the array A.
The array A is declared as a module/user-form scoped variable here, and assigned default/initial values during the form's _Initialize event. Those values are then changed if the user makes a selection(s) in the ListBox.
Option Explicit
Dim A()
Private Sub UserForm_Initialize()
'Assigns initial values to your array:
A = Array(25, 50, 75, 100)
'Assigns the default ListBox items:
Me.ListBox1.List = Array("1", "2", "3")
End Sub
Private Sub ListBox1_AfterUpdate()
Dim lb As MSForms.ListBox
Dim i As Long, v As Long
Set lb = Me.ListBox1 '# Modify as needed
For i = 0 To lb.ListCount - 1
If lb.Selected(i) Then
Select Case lb.List(i)
Case "1"
v = 10
Case "2"
v = 0
Case "3"
v = 1000
End Select
'confirm prev & new values for array:
MsgBox (A(i) & " will be changed to: " & v)
A(i) = v
'Confirm the value in array has changed
MsgBox (A(i))
End If
Next
End Sub
Depending on where/when you initialize the A array, you could modify this and invoke it from the ListBox_Change or ListBox_AfterUpdate event, or call it from another control's event procedure as needed.
=True. Same for "2" and "3", etc. Do you mean if the item is selected in the listbox?