[英]Using late binding to Excel, how do I move from the active cell to the first cell in the next row?
[英]Excel : How do I call the “active cell” to a cell
我有Excel 2013
目前我有一個代碼,可以點擊任何單元格,並將其內容顯示給另一個單元格。
我通過互聯網挖掘出了下面的代碼。
如何在每次要更改位置(b15)的情況下將其調用到具有自定義公式的單元格而不是編輯代碼?
Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal Target As Range)
If Not Intersect(Target, ActiveSheet.UsedRange) Is Nothing Then
Range("B15").Value = Target.Value
End If
End Sub
先感謝您。
在標准模塊中包括:
Public Function ShowMe() As Variant
Application.Volatile
ShowMe = ActiveCell.Value
End Function
並在工作表代碼區域包括:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Application.Calculate
End Sub
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.