Underscore/bold in InputBox

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
 
B

Brian

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top