ユーザーがそれぞれボタン「BACK」と「NEXT」を押してデータを変更できるようにする機能を考え出そうとしています。
私はこのコードを使用しています:
CounterID = IdArray.Length 'array of IDs
determinator = CounterID 'determining which index is active and putting it on the top of array
If Ident = 1 Then ' if button back is pressed
determinator = determinator + 1
If determinator <= CounterID Then
'some actions
End If
Else
determinator = determinator - 1
If determinator >= 0 Then
'some actions
End If
End If
実際に動作します。しかし、部分的に。私の問題は、ボタンが押されるたびに DETERMINATOR 変数の値が再び最大長に割り当てられることです。
この変数の再割り当てを回避し、一度だけ発生させる方法はありますか?