السلام عليكم ورحمه الله وبركاته اخواني الاكارم
اعرض مشكلة اخر غير منطقية و اجهتني في الفيجوال بيسك و اظن انها من خطأ سوفت وير
فارجو من احدى الاخوة الذين واجهتم مثل هذه المشاكل ان يفيدني
رسالة الخطأ
اقتباسcompile error :end with without with
لاحظ الكود التالي الذي لا يحتوي خطأ اطلاقا
اقتباسPrivate Sub CtrlMoveTxtFlex(Optional VkeyCode As Integer)
Const ShowRows = 8
Static Cl As Integer, Rw As Integer
Call MsgBar(StbarPurchase, 0, "", TaskFormPur)
With HFlexPurchase
.TextMatrix(Rw, Cl) = TxtFlex.Text
Select Case VkeyCode
Case vbKeyUp
If .Row <> 1 Then .Row = .Row - 1
Case vbKeyDown
If .Row <> .Rows - 1 Then .Row = .Row + 1
Case vbKeyLeft
If .TextMatrix(.Row, Cl) <> "" Then
If .Col <> .Cols - 1 Then .Col = .Col + 1
If Cl = 2 Then .Col = .Col + 2
If Cl = 6 Then .Col = .Col + 1
ElseIf Cl <> 8 Then
GoTo 1
End If
Case vbKeyRight
If .TextMatrix(.Row, Cl) <> "" Then
If .Col <> 1 Then .Col = .Col - 1
If Cl = 5 Then .Col = .Col - 2
If Cl = 8 Then .Col = .Col - 1
ElseIf Cl = 8 Then
If .Col <> 1 Then .Col = .Col - 1
If Cl = 5 Then .Col = .Col - 2
If Cl = 8 Then .Col = .Col - 1
ElseIf Cl <> 8 Then
GoTo 1
End If
Case vbKeyReturn
If .TextMatrix(.Row, Cl) <> "" Then
If .Col < 5 Then
.Col = 5
ElseIf .Col >= 5 And .Col < 6 Then
.Col = .Col + 1
ElseIf .Col = 6 Then
.Col = .Col + 2
End If
ElseIf .Col = 8 Then
.Col = 2
If .Row <> .Rows - 1 Then
.Row = .Row + 1
ElseIf .Row = .Rows - 1 Then
.Rows = .Rows + 1
.Row = .Row + 1
End If
ElseIf Cl <> 8 Then
GoTo 1
End If
End Select
If .Rows >= ShowRows Then
Sps = 260
Else
Sps = 0
End If
If .Col <> 3 Then
If .Col = 1 Then .Col = 2
If .Col = 4 Then .Col = 5
If .TextMatrix(.Row, Cl) = "" Then GoTo 1
end if
TxtFlex.Move .Left + .CellLeft + Sps, .Top + .CellTop, .CellWidth - 50, .CellHeight - 50
TxtFlex.Text = .TextMatrix(.Row, .Col)
If Cl = 2 Then
Call GetDataGoods
End If
Cl = .Col
Rw = .Row
End With
Exit Sub
1
Call MsgBar(StbarPurchase, 2, "ارجو ملأ الفراغات", TaskFormPur)




