急啊 急啊 分可以在加鼠标在表里运行的问题

hepengwei hepengwei 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
鼠标在单元格出现
记录不能跳行输入
我的代码是如下
谁有类似的或帮我挑挑毛病
rivate Sub SGrid_LeaveCell(ByVal Col As Long, ByVal Row As Long, ByVal NewCol As Long, ByVal NewRow As Long, Cancel As Boolean)
' If SGrid.ActiveRow > lrow Then
' SGrid.Row = SGrid.ActiveRow
' SGrid.Col = SGrid.ActiveCol
' If Len(Trim(SGrid.Text)) <> 0 Then
' lrow = SGrid.ActiveRow
' End If
' End If
'
' Select Case SGrid.ActiveCol
' Case 1, 2, 3, 4
' SGrid.Row = SGrid.ActiveRow
' SGrid.Col = SGrid.ActiveCol
' If Len(Trim(SGrid.Text)) = 0 Then
' SGrid.SetFocus
'' SGrid.Action = 0
' Exit Sub
' End If
' End Select
'End Sub

'Private Sub SGrid_LeaveRow(ByVal Row As Long, ByVal RowWasLast As Boolean, ByVal RowChanged As Boolean, ByVal AllCellsHaveData As Boolean, ByVal NewRow As Long, ByVal NewRowIsLast As Long, Cancel As Boolean)
' For i = 1 To NewRow - 1
' SGrid.Row = 1
' SGrid.Col = 1
' If Len(Trim(SGrid.Text)) = 0 Then
' MsgBox "不能为空"
' SGrid.SetFocus
' Exit Sub
' End If
' SGrid.Col = 2
' If Len(Trim(SGrid.Text)) = 0 Then
' MsgBox "不能为空"
' SGrid.SetFocus
' Exit Sub
' End If
' SGrid.Col = 3
' If Len(Trim(SGrid.Text)) = 0 Then
' MsgBox "不能为空"
' SGrid.SetFocus
' Exit Sub
' End If
' SGrid.Col = 4
' If Len(Trim(SGrid.Text)) = 0 Then
' MsgBox "不能为空"
' SGrid.SetFocus
' Exit Sub
' End If
'End Sub
...全文
评论 3
收藏 已收藏
分享
返回顶部
hepengwei
资源 1,065 成员 6,492 内容