Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Replace microsoft forms message box with something more meaningful

Hi

I have a userform with a combobox whos "match entry" property is set to
True. If the user enters invalid text they get a microsoft forms message
saying invalid property value.
How do I change the message to something more meaningful.

I would be grateful for any help

Kenny W
XP pro and Office 2003


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Replace microsoft forms message box with something more meaningful

On Fri, 18 Jul 2008 20:30:14 +0100, "Forum Freak"
wrote:

I have a userform with a combobox whos "match entry" property is set to
True. If the user enters invalid text they get a microsoft forms message
saying invalid property value.
How do I change the message to something more meaningful.


There is not built in way to change that message.

I have an alternate suggestion. Change the Style property from Combo to
DropDown. That will prevent the user from entering invalid characters and
obviate the need for a message.

If you still want to roll your own, you'll need to set MatchEntry to False,
then use the Change event to cycle through the list to determine when an
invalid character is entered. Unfortunately, Excel doesn't have a NotInList
event like Access.

If you like, I can write some basic Change event code that will get you
started.
--
Dick
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Replace microsoft forms message box with something more meaningful

Thanks for looking at this one Dick

The problem occured after I changed the Style from Combo to list! Under
normal circumstances the messagebox never occurs however I can evoke the bug
in the following manner.

There is a command button on the userform which when clicked clears all the
text boxes and comboboxes. After this has been used it is possible to
select the comboboxes whos style is set to list rather than combo. If you
single click the empty box but dont do anything else , then click in another
box or button you get the dreaded "invalid property value" message. This
locks everything until you enter correct details into the List type boxes.

This is ok as ultimately this is what I want however some users will not
understand what to do, hence the need for a user friendly message. I
currently have a label on the userform displaying what to do in the event
of... however it smacks of unprofessionalism.

Thanks for the offer of writing some code but I will decline for now.
Whilst writing this I have just thought perhaps I should change the code
behind my clear button. I wonder if not clearing these two boxes or
replacing the text to something within the list will cure the bug?

Thanks for your continued assistance over the years.

Regards
Kenny

"Dick Kusleika" wrote in message
...
On Fri, 18 Jul 2008 20:30:14 +0100, "Forum Freak"
wrote:

I have a userform with a combobox whos "match entry" property is set to
True. If the user enters invalid text they get a microsoft forms message
saying invalid property value.
How do I change the message to something more meaningful.


There is not built in way to change that message.

I have an alternate suggestion. Change the Style property from Combo to
DropDown. That will prevent the user from entering invalid characters and
obviate the need for a message.

If you still want to roll your own, you'll need to set MatchEntry to
False,
then use the Change event to cycle through the list to determine when an
invalid character is entered. Unfortunately, Excel doesn't have a
NotInList
event like Access.

If you like, I can write some basic Change event code that will get you
started.
--
Dick



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default Replace microsoft forms message box with something more meaningful

On Wed, 23 Jul 2008 22:43:15 +0100, "Forum Freak"
wrote:

There is a command button on the userform which when clicked clears all the
text boxes and comboboxes. After this has been used it is possible to
select the comboboxes whos style is set to list rather than combo. If you
single click the empty box but dont do anything else , then click in another
box or button you get the dreaded "invalid property value" message. This
locks everything until you enter correct details into the List type boxes.


You're right, that's exactly how it works. How silly. It appears that if
you change MatchRequired to False, you can avoid this problem. If the Style
is still DropDown, the user can't enter anything that's not on the list. So
it seems that MatchRequired does nothing (other than cause errors) if the
Style is DropDown.

Thanks for the offer of writing some code but I will decline for now.
Whilst writing this I have just thought perhaps I should change the code
behind my clear button. I wonder if not clearing these two boxes or
replacing the text to something within the list will cure the bug?


Yeah you don't need any code, I misunderstood the question. Try changing
Match Required to False and see if that gives you better behavior, even if
it's not exactly what you may want.
--
Dick
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Replace microsoft forms message box with something more meaningful

Thanks for continuing with this thread.

As I was hell bent on stopping users screwing up the database I would have
never considered setting MatchRequired to False!

Needless to say I have tested it on my spreadsheet and it works.

Thanks again
Kenny
"Dick Kusleika" wrote in message
...
On Wed, 23 Jul 2008 22:43:15 +0100, "Forum Freak"
wrote:

There is a command button on the userform which when clicked clears all
the
text boxes and comboboxes. After this has been used it is possible to
select the comboboxes whos style is set to list rather than combo. If you
single click the empty box but dont do anything else , then click in
another
box or button you get the dreaded "invalid property value" message. This
locks everything until you enter correct details into the List type boxes.


You're right, that's exactly how it works. How silly. It appears that if
you change MatchRequired to False, you can avoid this problem. If the
Style
is still DropDown, the user can't enter anything that's not on the list.
So
it seems that MatchRequired does nothing (other than cause errors) if the
Style is DropDown.

Thanks for the offer of writing some code but I will decline for now.
Whilst writing this I have just thought perhaps I should change the code
behind my clear button. I wonder if not clearing these two boxes or
replacing the text to something within the list will cure the bug?


Yeah you don't need any code, I misunderstood the question. Try changing
Match Required to False and see if that gives you better behavior, even if
it's not exactly what you may want.
--
Dick



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
replace VBA run-time error message with custom message BEEJAY Excel Programming 13 July 14th 06 03:59 PM
Replace Excel Message w/Custom Message Kevin R Excel Programming 1 May 18th 06 04:13 PM
Intercept/replace standard 'cell protected' message with my own message? KR Excel Programming 3 March 16th 06 02:31 PM
Overwriting error message #NUM! with meaningful text Radio Ham Excel Discussion (Misc queries) 3 September 2nd 05 05:33 PM
Microsoft Forms Greg Excel Discussion (Misc queries) 3 March 9th 05 05:33 PM


All times are GMT +1. The time now is 09:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"