still learning
Well-known Member
- Joined
- Jan 15, 2010
- Messages
- 784
- Office Version
- 365
- Platform
- Windows
Hi
I’m using a command button in a userform to start a macro after data is entered in a text box
How do I modify or add to the code so I can use the enter key instead?
Chckfind runs an advance filter using what is in the text box(es)
mike
I’m using a command button in a userform to start a macro after data is entered in a text box
How do I modify or add to the code so I can use the enter key instead?
VBA Code:
Private Sub CommandButton1_Click()
With TextBox1
ActiveSheet.Range("ae3").Value = .Text
End With
With TextBox2
ActiveSheet.Range("af3").Value = .Text
End With
With TextBox3
ActiveSheet.Range("ag3").Value = .Text
End With
With TextBox4
ActiveSheet.Range("ai3").Value = .Text
End With
With TextBox5
ActiveSheet.Range("aj3").Value = .Text
End With
With TextBox6
ActiveSheet.Range("al3").Value = .Text
End With
Me.Hide
End With
chchkfind
Unload Me
End Sub
mike