- Parameter order matters, especially for a commonly used function.
- I use the Text parameter 100% of the time.
- I use the Default parameter around 80% of the time.
- I use the Title and/or Options parameter around 5% of the time.
- Therefore in my opinion, Default, should be the 2nd parameter, not the 4th parameter.
- Indeed, when I wrote my own custom InputBox function, it was the obvious choice.
- That's good data, but is based on a one-person data set, so I'm writing to consult other people.
Raw data:
Code: Select all
Text, Default, (Window) Title, Options
474 InputBoxes:
100 T
351 TD
3 TDWO
6 T__O
14 TD_O
contained Text: 474/474 = 100%
contained Default: 368/474 = 77.6%
contained Options: 23/474 = 4.9%
contained Title: 3/474 = 0.6%
Code: Select all
;parameter orders at present:
MsgBox(Text, Title, Options)
InputBox(Text, Title, Options, Default)
;proposed InputBox parameter order:
InputBox(Text, Default, Title, Options)
;two alternative orders, not mentioned in the poll:
MsgBox(Text, Options, Title)
InputBox(Text, Default, Options, Title)