I have used a combo box to give the user a number of options, added using the code shown below:
Private Sub UserForm_Activate() Me.ComboBox1.AddItem "This" Me.ComboBox1.AddItem "is" Me.ComboBox1.AddItem "a" Me.ComboBox1.AddItem "test!" End Sub
Firstly, may I check that this is an acceptable method of adding ? For some reason I find this more logical than the 'For ComboBox1' method, although once my project is complete, I'll replace it with that
I have set the 'Match Required' property of the combo box to 'True', so that when they enter something other than one of those choices, it will give an error message. The problem is that this message is simply titled "Microsoft Forms" with the message "Invalid property value".
The problem this poses me with is that my end user is... well.. 'less experienced' with ICT than some people, and may not understand why this error is occuring.
The main question here therefore is:
Can the title and/or the text in the error message be changed?
Notes:
I have currently tried the following code, but to no avail - any help or advice?
Private Sub ComboBox1_Error(ByVal Number As Integer, ByVal Description As MSForms.ReturnString, ByVal SCode As Long, ByVal Source As String, ByVal HelpFile As String, ByVal HelpContext As Long, ByVal CancelDisplay As MSForms.ReturnBoolean) Description = "The given value is incorrect, please type or pick another choice" End Sub
Thanks in advance for reading, and thanks again for any help,
Chris W