Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a ComboBox (txtSignature) on a userform that gets it's
information from a dynamic list (DealerName). If I enter a name that is not in DealerName, I get an error message "Run-time error '381': Could not get the List property. Invalid property array index." Instead of this message, I would like to give the user a message allowing three options: 1) add the new name to the dynamic list and enter the new name onto the form as if the name were there all along; 2) add as if it were in the list, but don't add it to the list; 3) cancel and do nothing but clear the user form. Using vbaMsgBoxYesNoCancel, I just don't know how to code it where above option 1 = yes, 2 = no, 3 = cancel in the MsgBox Does anybody have the code for this? Thanks in advance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Do this to identify the error and then show a NEW userform to add your
desired controls Above the line that gets the error message put this On Error Goto ErrorHandler Somewhere else in the script type ErrorHandler: If Err.Number = 381 then userform.show ' Put you NEW userform name here exit sub 'Keep this if you want to terminate the userfrom here end if With this you will then need to create a NEW userform to accomodate the controls you require Let us know how you get on and If you have any trouble you can email me at -- Message posted via http://www.officekb.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Dynamic top 20 list | Excel Discussion (Misc queries) | |||
Changing named Validation list to Dynamic list. | Excel Discussion (Misc queries) | |||
add to a dynamic list | Excel Programming | |||
add to a dynamic list | Excel Programming | |||
Dynamic list box | Excel Programming |