Results 1 to 6 of 6

simulate "Enter" key to transfer data

Threaded View

  1. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,765

    Re: simulate "Enter" key to transfer data

    Try:

    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
    p.s. please wrap your code into CODE tag.
    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Continue code after input password without "Ok" or "Enter"
    By scallebe in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2018, 05:01 PM
  2. ActiveX Textbox - "Enter" or "Return" key event - possible?
    By ironfelix717 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-01-2018, 09:56 PM
  3. Need CountCellsByColor formula to update automatically without pressing "F2" "Enter"
    By PsychicFish in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-16-2016, 12:40 AM
  4. [SOLVED] IF CELL is "Yes" the enter "Enabled" IF CELL is "No" enter "Disabled"
    By king10001 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-10-2016, 09:33 AM
  5. Enter Data on "Main" or "Input" Sheet and Copy to One of Many Other Sheets
    By timothy_no7 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-21-2012, 07:29 PM
  6. VBA editor auto changes "." to "'#" as you type ... not just after pressing <enter>?
    By Stripey_uk in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-04-2011, 08:00 AM
  7. How to simulate "Data>Form" in VBA
    By Baapi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-29-2006, 06:10 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1