我想在表A中几列获取焦点,其它列不能改,也不能获取焦点。请看看下表事件beforeselchange语句思路正确么?现一点击表任意位置,狐表就退出了!
If Tables("表A").Current Is Nothing Then
Return
End If
Select Case Tables("表A").Cols(e.OldRange.ColSel).name
Case "产品"
Tables("表A").Select(Tables("表A").Current.Index,Tables("表A").Cols("系数").Index)
Case "系数"
If Tables("表A").Current("系数")>0 Then
Tables("表A").Select(Tables("表A").Current.Index+1,Tables("表A").Cols("产品").Index)
Else
e.Cancel=True
End If
Case Else
e.Cancel=True
End Select
[此贴子已经被作者于2013-9-25 8:32:40编辑过]