View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Oskar von dem Hagen Oskar von dem Hagen is offline
external usenet poster
 
Posts: 4
Default Prevent "standard" key event in userform

Thanks. Apparently I have to use KeyDown to catch PgDn or PgUp. (Bullen et al. write "Most VBA users will never have to create their own objects because Excel already provides all of the objects they need." That's why I skipped the chapter on class modules. :-)

I was surprised not to find a ready solution in the newsgroup. What do other authors do, force people to use the mouse

My hopefully last problem in this thread is probably trivial but I haven't figured it out yet. Why does the class modul not recognize the subroutine bnNext_Click, containd in the UserForm in the same Project? And how can I change this

Private Sub txtbox_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer
Select Case KeyCod
Case 3
bnNext_Clic
Case 3
bnPrevious_Clic
Case Els
Exit Su
End Selec
KeyCode =
End Su

Oska

P.S. I love the "skrev i melding".