+ Reply to Thread
Results 1 to 10 of 10

can not use set.focus to return to combobox (exit by val)

  1. #1
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    can not use set.focus to return to combobox (exit by val)

    hi
    can anyone tell me how to return focus to combobox
    Please Login or Register  to view this content.
    this is my code for combobox1 if the item is not there a textbox appears telling you its been issued then I want to setfocus back to combo instead of going to next
    if I use combobox1_change as soon as I enter 1 number in box the textbox appears if the item is there or not,have tried afterupdate aswell,still will not set.focus
    any ideas please
    cheers colin
    Last edited by cfinch100; 11-30-2013 at 02:12 PM.

  2. #2
    Valued Forum Contributor xlbiznes's Avatar
    Join Date
    02-22-2013
    Location
    Bahrain
    MS-Off Ver
    Excel 2007
    Posts
    1,223

    Re: can not use set.focus to return to combobox (exit by val)

    Hi,

    Where does the focus shift to after this event ?
    Happy Computing ,

    Xlbiznes.

    To show your appreciation please click *

  3. #3
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    2,015

    Re: can not use set.focus to return to combobox (exit by val)

    Colin, I think it's easier to see the issue if you upload a test file having the same structure as the original file and maybe someone can help you...
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  4. #4
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    Re: can not use set.focus to return to combobox (exit by val)

    hi
    it goes to combobox2,have put combobox1.setfocus in there but does not go back,frmissued
    has 10 comboboxes if you enter 5030 in combo1a textbox appears to say its been issued waits 2 seconds then disappears but can not set.focus back to it to enter different code
    cheers colin
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    Re: can not use set.focus to return to combobox (exit by val)

    hi john55
    uploaded as requested thanks
    cheers colin

  6. #6
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2010
    Posts
    2,015

    Re: can not use set.focus to return to combobox (exit by val)

    Colin, I am really sorry, it's easy for you because you know very well how yr file works, colud you tell us the steps, I mean how you start and i do not find combobox1 in frmissued...
    Last edited by john55; 11-30-2013 at 06:34 AM. Reason: it's behind textbox172...

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,626
    Colin

    Why aren't you using Cancel = True?
    If posting code please use code tags, see here.

  8. #8
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    Re: can not use set.focus to return to combobox (exit by val)

    hi norie
    never used that norie not sure how to implement where would it be used
    cheers colin

  9. #9
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    Re: can not use set.focus to return to combobox (exit by val)

    hi john
    sorry its me in developer /frmissued to the right of blue issued textbox the drop down arrow is for combo1 the issued box is laid over the top of comboboxes,as said I should have explained better
    cheers colin

  10. #10
    Forum Contributor
    Join Date
    10-01-2012
    Location
    england
    MS-Off Ver
    Excel 2016 pro
    Posts
    760

    Re: can not use set.focus to return to combobox (exit by val)

    hi norie
    have found where to put and seems to work well will give it a better looking at later thanks,looks pretty simple when you know how
    cheers colin

+ 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. [SOLVED] ComboBox Search and focus on cell
    By adam2308 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-31-2012, 05:46 PM
  2. combobox.exit event
    By fozze in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2008, 07:27 AM
  3. [SOLVED] Which combobox has the focus?
    By Daniel Bonallack in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-31-2006, 09:25 PM
  4. [SOLVED] Focus after combobox
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-27-2005, 09:05 AM
  5. OLE Combobox: Excel breaks down when it has focus
    By deathyam@yahoo.com in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-29-2005, 06:06 PM

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