Underscore/bold in InputBox

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Is there a way to format a character in the prompt for an input box to give
the user a clue concerning valid entry in the InputBox? I am trying to get
away from using the parentheses to indicate the key character to input for
the selection:

Dim UserResponse As String
Dim MsgBoxText As String
MsgBoxText = MsgBoxText & "(A)pply changes"
MsgBoxText = MsgBoxText & Chr(13)
MsgBoxText = MsgBoxText & "(D)iscard changes"
MsgBoxText = MsgBoxText & Chr(13)
MsgBoxText = "(R)everse stops and review"
TryAgain: 'retry point if user enters invalid data
UserResponse = InputBox(MsgBoxText, "", "D")
If UserResponse = "" Then Exit Sub 'user canceled
If InStr("ADR", UserResponse) = 0 Then GoTo TryAgain 'invalid entry
Select Case UserResponse
Case "A"
'approve changes
Case "D"
'discard changes & close
Case "R"
'revers the stop order & go back to InputBox for further instruction.
End Select
 
Thank you, Alex. I was just hoping to avoid the bit of extra work involved in
opening the form, then transferring the results back to the form that called
it, but it sounds like that is the only way.
 
Back
Top