اعمل موديول وضع فيه هذا الكود
Option Explicit
Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Function GetTabState() As Boolean
GetTabState = GetKeyState(&H9) And &HFF00
End Function
ثم في الفورم ضع هذا الكود للانتقال من text2 الى text5 اذا تم الضغط على tab
Private Sub Text2_LostFocus()
If GetTabState Then Text5.SetFocus
End Sub
Option Explicit
Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer
Function GetTabState() As Boolean
GetTabState = GetKeyState(&H9) And &HFF00
End Function
ثم في الفورم ضع هذا الكود للانتقال من text2 الى text5 اذا تم الضغط على tab
Private Sub Text2_LostFocus()
If GetTabState Then Text5.SetFocus
End Sub

