Selection Change Changing Text Box Value
- Put the following into the sheet module (e.g.
Sheet1
) of the worksheet where the text box is located.
The Code
Option Explicit
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const sCol As String = "B"
Dim rg As Range: Set rg = Intersect(Columns("B"), Target)
If Not rg Is Nothing Then
TextBox1.Value = rg.Cells(1).Value
End If
End Sub
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…