The attached form looks exactly like the standard input box except that since it is a form you have full control over what you do with it. I've added the following properties to the form.
VB Code:
' frmInputBox.ButtonClicked ' Returns vbOK or vbCancel ' depending on the button clicked ' frmInputBox.Default ' Returns/sets the initial value ' for user input ' frmInputBox.Display ' Show the form modally ' frmInputBox.PasswordProtect ' Returns/sets whether characters ' typed by the user are protected ' by asterisks. (If this is set to True, ' it doesn't make sense to set the Default ' property. ' frmInputBox.Prompt ' Set the InputBox Prompt value ' frmInputBox.Title ' Set the InputBox Caption value
Usage
VB Code:
frmInputBox.Title = "Value Entry" frmInputBox.Prompt = "Please enter a value" frmInputBox.Display If vbCancel = frmInputBox.ButtonClicked Then MsgBox "You pressed Cancel" End If


Reply With Quote

