03856me
Active Member
- Joined
- Apr 4, 2008
- Messages
- 297
This code is working perfectly when the ENTER key is used. My user would like to use the TAB key most times since she uses the tab key on her primary program and it has become a habit. I have multiple folks using this program and some want the ENTER key and some the TAB key. Can this code be modified to accept either ENTER or TAB to trigger the event?
Code:
Private Sub cbo_InOut_Exit(ByVal Cancel As MSForms.ReturnBoolean)
cbo_InOut.BackColor = &HFFFFFF
If cbo_InOut.Value = "I" Then
Me.txt_ibS4S.Visible = True
Me.txt_ibRGH.Visible = True
Me.txt_ibfullpanel.Visible = True
Me.txt_ibhalfpanel.Visible = True
Me.txt_ibpanelftg.Visible = True
Me.txt_rateIBs4s.Visible = True
Me.txt_rateIBrgh.Visible = True
Me.txt_rateIBfull.Visible = True
Me.txt_rateIBhalf.Visible = True
Me.txt_IBs4sINCOME.Visible = True
Me.txt_IBrghINCOME.Visible = True
Me.txt_IBfullINCOME.Visible = True
Me.txt_IBhalfINCOME.Visible = True
Me.lbl_ibs4s.Visible = True
Me.lbl_ibrgh.Visible = True
Me.lbl_ibfullpanel.Visible = True
Me.lbl_ibhalfpanel.Visible = True
Me.lbl_ibpanelftg.Visible = True
Me.lbl_inbound.Visible = True
Me.txt_obtruck.Value = ""
Me.txt_obcar.Value = "0"
Me.txt_obfootage.Value = ""
Me.txt_obpanelftg.Value = ""
Me.txt_obdtruck.Value = ""
Me.txt_obdpanelftg.Value = ""
Me.txt_obdlumberftg.Value = ""
Me.txt_OBtruckINCOME.Value = ""
Me.txt_OBDtruckINCOME.Value = ""
Me.txt_obtruck.Visible = False
Me.txt_obcar.Visible = False
Me.txt_obfootage.Visible = False
Me.txt_obpanelftg.Visible = False
Me.txt_rateOBtruck.Visible = False
Me.txt_OBtruckINCOME.Visible = False
Me.lbl_obtruck.Visible = False
Me.lbl_obcar.Visible = False
Me.lbl_obfootage.Visible = False
Me.lbl_obpanelftg.Visible = False
Me.lbl_outbound.Visible = False
Me.txt_obdtruck.Visible = False
Me.txt_obdpanelftg.Visible = False
Me.txt_obdlumberftg.Visible = False
Me.txt_rateOBDtruck.Visible = False
Me.txt_OBDtruckINCOME.Visible = False
Me.lbl_obdtruck.Visible = False
Me.lbl_obdpanelsftg.Visible = False
Me.lbl_obdlbrftg.Visible = False
Me.lbl_obdunn.Visible = False
Else
If cbo_InOut.Value = "O" Then
Me.txt_obtruck.Visible = True
Me.txt_obcar.Visible = True
Me.txt_obfootage.Visible = True
Me.txt_obpanelftg.Visible = True
Me.txt_rateOBtruck.Visible = True
Me.txt_OBtruckINCOME.Visible = True
Me.lbl_obtruck.Visible = True
Me.lbl_obcar.Visible = True
Me.lbl_obfootage.Visible = True
Me.lbl_obpanelftg.Visible = True
Me.lbl_outbound.Visible = True
Me.txt_ibS4S.Value = ""
Me.txt_ibRGH.Value = ""
Me.txt_ibfullpanel.Value = ""
Me.txt_ibhalfpanel.Value = ""
Me.txt_ibpanelftg.Value = ""
Me.txt_IBs4sINCOME.Value = ""
Me.txt_IBrghINCOME.Value = ""
Me.txt_IBfullINCOME.Value = ""
Me.txt_IBhalfINCOME.Value = ""
Me.txt_ibS4S.Visible = False
Me.txt_ibRGH.Visible = False
Me.txt_ibfullpanel.Visible = False
Me.txt_ibhalfpanel.Visible = False
Me.txt_ibpanelftg.Visible = False
Me.txt_rateIBs4s.Visible = False
Me.txt_rateIBrgh.Visible = False
Me.txt_rateIBfull.Visible = False
Me.txt_rateIBhalf.Visible = False
Me.txt_IBs4sINCOME.Visible = False
Me.txt_IBrghINCOME.Visible = False
Me.txt_IBfullINCOME.Visible = False
Me.txt_IBhalfINCOME.Visible = False
Me.lbl_ibs4s.Visible = False
Me.lbl_ibrgh.Visible = False
Me.lbl_ibfullpanel.Visible = False
Me.lbl_ibhalfpanel.Visible = False
Me.lbl_ibpanelftg.Visible = False
Me.lbl_inbound.Visible = False
End If
End If
End Sub