![]() |
keyascii = 13
Hi,
Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 13 Then msgbox 123 End If End Sub When I press ENTER button there is no msgbox. How can I make this code work? Thanks, |
keyascii = 13
Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then MsgBox "123" End If End Sub "ermeko" wrote: Hi, Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 13 Then msgbox 123 End If End Sub When I press ENTER button there is no msgbox. How can I make this code work? Thanks, |
keyascii = 13
This code does not work.
also how can I make Textbox1.setfocus. It does not work. "Steven" wrote: Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then MsgBox "123" End If End Sub "ermeko" wrote: Hi, Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 13 Then msgbox 123 End If End Sub When I press ENTER button there is no msgbox. How can I make this code work? Thanks, |
keyascii = 13
It does, I tried it and it is fine.
TextBox1.SetFocus -- --- HTH Bob (change the xxxx to gmail if mailing direct) "ermeko" wrote in message ... This code does not work. also how can I make Textbox1.setfocus. It does not work. "Steven" wrote: Private Sub TextBox1_KeyUp(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then MsgBox "123" End If End Sub "ermeko" wrote: Hi, Private Sub TextBox1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If KeyAscii = 13 Then msgbox 123 End If End Sub When I press ENTER button there is no msgbox. How can I make this code work? Thanks, |
All times are GMT +1. The time now is 01:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com