surpressing listbox changes
I have a listbox on a sheet. In the listbox change procedure I do a test.
If the test is positive I want to suppress the listbox from changing . I
tried to do this by changing the listbox.listindex to the previous value.
However, that triggers the change procedure again. I tried to use a
modification of this code but to no avail.
Private Sub TextBox1_Change()
Static AutoAction As Boolean
Dim TabPos As String
If AutoAction = True Then
Exit Sub
End If
AutoAction = True
With Me.TextBox1
' Your code here.
' For example,
.Text = Replace(.Text, Chr(9), "")tiggering code
End With
AutoAction = False
End Sub
In this code the triggering code does not trigger the second time thru. In
my case it does. I welcome any suggestions.
--
russ
|