|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
学习ExecuteExcel4Macro
- Private Sub Worksheet_SelectionChange(ByVal Target As Range)
- If (Not Intersect(Target, Range("B2:D15,D30,F5:G8,H13,L3")) Is Nothing) And Target.Count = 1 Then '符合指定单元格并满足只选择一个单元格时
- Dim ActiveCellX As Integer
- Dim ActiveCellY As Integer
- ActiveCellX = ExecuteExcel4Macro("GET.CELL(44)")
- ActiveCellY = ExecuteExcel4Macro("GET.CELL(43)")
- Debug.Print ActiveCellX, ActiveCellY
- With 小键盘
- .Show 0
- .Top = ActiveCellY + 110
- .Left = ActiveCellX
- End With
- Else '否则
- Unload 小键盘 '退出小键盘
- End If
- End Sub
复制代码 |
|