Try:
p.s. please wrap your code into CODE tag.![]()
Private Sub ListBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then [Pcode].Value = Me.ListBox1.Value Unload Me End If End Sub
Try:
p.s. please wrap your code into CODE tag.![]()
Private Sub ListBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer) If KeyCode = 13 Then [Pcode].Value = Me.ListBox1.Value Unload Me End If End Sub
Last edited by KOKOSEK; 02-12-2020 at 10:19 AM.
Happy with my answer * Add Reputation.
If You are happy with solution, please use Thread tools and mark thread as SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks