|
楼主 |
发表于 2010-7-26 09:26
|
显示全部楼层
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
有网友提出:
能不能请高手做一个既可以用鼠标双击,又能用回车来确认选择的问题 问题链接:
http://club.excelhome.net/viewth ... p;page=1&extra=
感谢蓝桥玄霜大师的解答:
USERFORM1增加一段代码如下
Private Sub ListView1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
With ActiveSheet
.Cells(Selection.Row, Selection.Column).Offset(0, 0) = ListView1.SelectedItem.Text
.Cells(Selection.Row, Selection.Column).Offset(0, 1) = ListView1.SelectedItem.SubItems(1)
.Cells(Selection.Row, Selection.Column).Offset(0, 2) = ListView1.SelectedItem.SubItems(2)
.Cells(Selection.Row, Selection.Column).Offset(0, 3) = ListView1.SelectedItem.SubItems(3)
End With
Unload Me
End If
End Sub
同时感谢lapchiu!
[ 本帖最后由 FXSHENG 于 2010-7-26 15:25 编辑 ] |
|