This one has me stumped

M

mark

Hello All

I have a userform with a drop down that has its' properties set to 'must
match'. When one particular user enters information he is not able to
understand that if the case drops, high-lighting goes etc he needs to update
the database with his product/information. This also creates the pop up
Invalid property value - what is the error code number for this error so I
can write a meaniful message on screen? Also as a bit of fun I am trying to
show another msgbox when he selects his name from another combobox!

Thanks for any help

Mark
 
B

Bob Flanagan

In the procedure that runs that creates the error because of the bad combo
input, check the combobox's ListIndex value to see if it is -1, which
indicates no selection. If -1, ask him to correct and exit the routine.

On the other combobox, the one with his name, double click the box to get to
the box's change procedure. Then just check the value:

if Me.combobox1.value ="Mickey Mouse" then
msgbox "Hello Mickey"
end sub

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 
M

mark

As an aside would anyone know of a script to run a macro if the username or
product was not in the drop down list and give the opportunity to add the
user/product?
 
Top