View Single Post
  #1   Report Post  
sam99 sam99 is offline
Junior Member
 
Posts: 6
Default From Excel to user form

Hi,
how can I make this code for user form and text box instead of sheet and cells

Private Sub Worksheet_Change(ByVal Target As Range)

'Only single cell selections are of interest
If Target.Count 1 Then Exit Sub

Application.EnableEvents = False
'Is the cell that changed the one we want?
If Target.Address = "$C$14" Then
Range("$E$21") = Target * Worksheets("Sheet2").Range("$G$5)
End If
Application.EnableEvents = True

End Sub