disable pageup and pagedown

P

Phyllis

I can't find the answer to this. I want to turn off the pageup and pagedown
function only when a combobox has been clicked. My user gets confused and
hits pagedown before exiting the combobox and changes her desired choice from
the combobox.

Is there a way to disable it?
 
J

john

see if this does what you want.

Sub disablekeys()

With Application

.OnKey "{PGDN}", ""

.OnKey "{PGUP}", ""

End With

End Sub


Sub enablekeys()

With Application

.OnKey "{PGDN}"

.OnKey "{PGUP}"

End With

End Sub
 

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