本帖最后由 快表帝国客服01 于 2024-5-14 12:34 编辑
VBA选择所选区域尾端的单元格
- Range("F6").EndLeft
- Range("F6").EndRight
- Range("F6").EndUp
- Range("F6").EndDown
复制代码
- Public Sub RangeSelection(sender As Object,e As SpreadsheetGear.Windows.Controls.RangeSelectionChangedEventArgs)
- If e.RangeSelection.Intersect(Range("SelectArea")) IsNot Nothing Then
- Range("Area").Interior.ColorIndex = 1
- e.RangeSelection.EndLeft.Interior.ColorIndex = Range(e.RangeSelection.Row, 1).Value
- e.RangeSelection.EndRight.Interior.ColorIndex = Range(e.RangeSelection.Row, 11).Value
- e.RangeSelection.EndUp.Interior.ColorIndex = Range(1, e.RangeSelection.Column).Value
- e.RangeSelection.EndDown.Interior.ColorIndex = Range(11, e.RangeSelection.Column).Value
- End If
- End Sub'单元格选择后执行的事件
复制代码
|
|
快表帝国客服01