[英]How to assign Single cell to range?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TxtRng As Range
Set TxtRng = ActiveCell
If Not Intersect(Target, TxtRng) Is Nothing Then
------------Statements
End If
End Sub
i am getting an infinite loop.我得到一个无限循环。 I just want to assign a single cell address to the range (eg. "B6" or "A5", as per selection)
我只想为该范围分配一个单元格地址(例如“B6”或“A5”,根据选择)
Just set it to the Target:只需将其设置为目标:
Set TxtRang = Target
Then you're golden.那你就是金子了。
Cheers, LC干杯,LC
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.