Article ID: 143115
Article Last Modified on 12/9/2003
Option Explicit
'This function will be used in place of the built in Choose function
'and this takes the setting of Option Base into account.
Public Function Choose(i As Integer, ParamArray a())
Choose = a(i + LBound(a) - 1)
End Function
Option Explicit
'Comment the next line to work around this behavior
Option Base 1
Private Sub Command1_Click()
Debug.Print Choose(1, "Index 1a", "Index 1b", "Index 1c")
Debug.Print Choose(2, "Index 2a", "Index 2b", "Index 2c")
Debug.Print Choose(3, "Index 3a", "Index 3b", "Index 3c")
End Sub
Additional query words: kbVBp400bug kbVBp500fix kbVBp kbdsd kbDSupport kbNoKeyWord
Keywords: kbbug kbfix KB143115