Accelerator

D

Dartmoor Graham

I am using Excel2000. I have a UserForm containing a CheckBox with the
caption “Match case†and I want to set “c†as the accelerator key, all in the
same manner as “Findâ€. However, it is the first occurrence of “c†that
becoming underlined and not the second as in “Findâ€. This is less meaningful
as a mnemonic. What can I do about this?
 
P

Peter T

In other programs you'd position the accelerator like this (in say VB)
Match &case

However in VBA the accelerator will always find the first instance of the
letter. But maybe you could capitalise the C in Case and assign "C" as the
accelerator.

I have no idea what you mean by "same manner as Find" and "not the second as
in "Find", so I might have misunderstood your objective.

Regards,
Peter T
 
D

Dartmoor Graham

Peter T said:
In other programs you'd position the accelerator like this (in say VB)
Match &case

However in VBA the accelerator will always find the first instance of the
letter. But maybe you could capitalise the C in Case and assign "C" as the
accelerator.

I have no idea what you mean by "same manner as Find" and "not the second as
in "Find", so I might have misunderstood your objective.

Regards,
Peter T





Peter T

Sorry if I was unclear. I was referring to the "Find" window in Excel that
is spawned either from Ctrl+F or via the Edit menu. That contains a "Match
case" CheckBox but Microsoft have somehow managed to underscore the second
"c", the one that starts the word "case", without needing to capitalise it.
This is much more meaningful than underscoring the "c" in Match. All I want
to do is the same thing.

I fear that your answer "in VBA the accelerator will always find the first
instance of the letter" is telling me that, in fact, I cannot do it in VBA
unless I am prepared to capitalise the second "c". This is a pity because I
was hoping to use the Microsoft style precisely.

A negative answer is always useful, even if disappointing, because it will
save me spending more time looking for a solution that doesn't exist.
 
P

Peter T

OK I follow now. The examples you refer to will use something like the "&"
prefix to define the accelerator, as I mentioned. Did you try the upper case
C idea for your particular caption.

Regards,
Peter T
 
D

Dartmoor Graham

Hi Peter T

Yes, and I can confirm for the benefit of other readers that this does work.
It's just disappointing that I can't make my UserForm look exactly like the
Microsoft one. However, you have saved me the time of looking further so
thank you for that.

Dartmoor Graham

PS I even tried deriving the first lowercase "c" from the Cyrillic alphabet
by copying and pasting one from Word, but that just resulted in a question
mark!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top