View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
ryan ryan is offline
external usenet poster
 
Posts: 46
Default Tab Order Code Problem

I have set the tab order for my worksheet from some code I found in another post. It works perfectly for going forward, but if you want to go backwards there is an error. Can someone please look at my code and tell me where my problem lies

Private Sub ComboBox6_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer
Dim bBackwards As Boolea
Select Case KeyCod
''' These are the only keys we care about
Case vbKeyTab, vbKeyReturn, vbKeyDown, vbKeyU
Application.ScreenUpdating = Fals
''' Determine if we need to move backwards
bBackwards = CBool(Shift And 1) Or (KeyCode = vbKeyUp
''' Activate the appropriate control based on key(s) pressed
If bBackwards Then Range("L10").Activate Els
ComboBox1.Activat
Application.ScreenUpdating = Tru
End Selec
End Su