still learning
Well-known Member
- Joined
- Jan 15, 2010
- Messages
- 826
- Office Version
- 365
- Platform
- Windows
Hi
Is there a way to press "enter" after a user types in a name in a text box in a userform to have a macro put that name in a cell.
After, the user will click on a checkbox and a macro will show the user the requested data.
I already made the macro and tested it.
The macros for the checkboxes work good, too
My problem is I don’t know if I can have the macro for the text box work without using a command button
I tried putting the textbox macro in >>>Private Sub TextBox1_Change()<<<
But either I’m using the wrong syntext or it doesn’t go there
If I put the macro in >>>Private Sub CommandButton1_Click()
It works after the command button is pressed
I would like not to have to use the command button
mike
Is there a way to press "enter" after a user types in a name in a text box in a userform to have a macro put that name in a cell.
After, the user will click on a checkbox and a macro will show the user the requested data.
I already made the macro and tested it.
The macros for the checkboxes work good, too
My problem is I don’t know if I can have the macro for the text box work without using a command button
I tried putting the textbox macro in >>>Private Sub TextBox1_Change()<<<
But either I’m using the wrong syntext or it doesn’t go there
If I put the macro in >>>Private Sub CommandButton1_Click()
It works after the command button is pressed
I would like not to have to use the command button
VBA Code:
private Sub CommandButton1_Click()
With TextBox1
ActiveSheet.Range("helpercell").Value = .Text
End With
'End Sub
mike