有关farpoint spread 单元格的问题。

jueling 2005-10-17 07:42:15
我的表格控件,一共有7列,其中第二列和第四列是设定锁定的,在回车事件设置的是移动到下一个单元格,

我现在光标在第一列中,我怎么才能按回车,让光标直接跳到第三列而不是第二列?

请问如何控制??谢谢了。。
...全文
243 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
lt_super 2005-10-20
  • 打赏
  • 举报
回复
他回答得是啥啊!
也配得80分!~
WTaoboy 2005-10-20
  • 打赏
  • 举报
回复
0 - None (Default) Active cell does not change SS_CELL_EDITMODE_EXIT_NONE
1 - Up Active cell moves up SS_CELL_EDITMODE_EXIT_UP
2 - Down Active cell moves down SS_CELL_EDITMODE_EXIT_DOWN
3 - Left Active cell moves left SS_CELL_EDITMODE_EXIT_LEFT
4 - Right Active cell moves right SS_CELL_EDITMODE_EXIT_RIGHT
5 - Next Next cell becomes active cell
(Active cell moves in the order left to right, top to bottom.) SS_CELL_EDITMODE_EXIT_NEXT
6 - Previous Previous cell becomes active cell
(Active cell moves in the order right to left, bottom to top.) SS_CELL_EDITMODE_EXIT_PREVIOUS
7 - Same Current cell remains active cell SS_CELL_EDITMODE_EXIT_SAME
8 - Next Row Active cell moves to first column of next row SS_CELL_EDITMODE_EXIT_NEXTROW
WTaoboy 2005-10-20
  • 打赏
  • 举报
回复
Private Sub Form_Load()
vaSpread1.EditEnterAction = 5
End Sub

Private Sub vaSpread1_LeaveCell(ByVal Col As Long, ByVal Row As Long, ByVal NewCol As Long, ByVal NewRow As Long, Cancel As Boolean)
With Me.vaSpread1

.Col = NewCol
.Row = NewRow
If .Lock = True Then
SendKeys "{Enter}"
End If
End With
End Sub
lt_super 2005-10-17
  • 打赏
  • 举报
回复
先让farpoint spread 捕捉到焦点;
col和row是你要跳到的位置;
不明白再问!~
lt_super 2005-10-17
  • 打赏
  • 举报
回复
用.SetActiveCell col,row 方法。

1,451

社区成员

发帖
与我相关
我的任务
社区描述
VB 控件
社区管理员
  • 控件
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧