+ Reply to Thread
Results 1 to 2 of 2

How to setfocus back to userform, after data input to cell, Confusing here

  1. #1
    Registered User
    Join Date
    11-12-2015
    Location
    Surabaya, Indonesia
    MS-Off Ver
    MS 365 (Windows 11 64-bit)
    Posts
    84

    How to setfocus back to userform, after data input to cell, Confusing here

    Hi All,

    Need help, to make the focus back to the userform after (I'll explained the step)
    1. there's list of items where it taken from column L & M, displayed by listview in userform
    2. the listview then detect which need to be bold & not (by value Y or N) with Vlookup
    3. the user then doubleclick to copy the selected data from listview to designated area (within D2:D24, pink area)

    this is where the focus problem occured
    4. if the user double click the bold item, it'll command msgbox "please select the one not bold" > it'll focus on the selected cell on the sheet, after press ok in msgbox, not focus on userform
    5. if the user double click the regular item, it'll input on selected cell > and STILL focus on the userform

    weird....

    if I change the code just to fill the cell with "", and not showing msgbox > the focus still on userform.

    any idea to still use msgbox, and keep the focus on userform?

    Floatinguserformmenulist.JPG

    here's the code
    on worksheet change
    Please Login or Register  to view this content.
    on Double click event
    Please Login or Register  to view this content.


    on Userform

    Please Login or Register  to view this content.

    Private sub for calling the list

    Please Login or Register  to view this content.
    thanks for the help
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    09-28-2014
    Location
    harbin,china
    MS-Off Ver
    2007
    Posts
    162

    Re: How to setfocus back to userform, after data input to cell, Confusing here

    Hi,radian89
    Try change Listview1 double click event like this
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel UserForm SetFocus
    By gopal baheti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-17-2015, 05:42 AM
  2. [SOLVED] Userform to search worksheet and display data back to the userform
    By zip247 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2015, 05:46 AM
  3. [SOLVED] SetFocus back to ComboBox on exit event doesn't seem to work (Excel 2010)
    By sx4vba in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-21-2015, 12:12 PM
  4. [SOLVED] Force SetFocus until input has been made
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-30-2015, 02:01 PM
  5. [SOLVED] SetFocus to another tab on a multi tab userform
    By abordeau in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-21-2014, 01:08 PM
  6. I need my userform to input data in the first empty cell of a row
    By msmitherc in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-14-2014, 07:09 PM
  7. question setfocus on a userform
    By GregJG in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2007, 11:28 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