+ Reply to Thread
Results 1 to 4 of 4

Worksheet focus problem, how do I set focus?

  1. #1
    Registered User
    Join Date
    07-19-2014
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4

    Worksheet focus problem, how do I set focus?

    I have a userform that has users enter a supply name, re-order amount, price, and they click an option button to see if this needs to be a credit card purchase or if it can be purchased from an online database called dmlss. If the user selects credit card, its supposed to enter 1 in the 5th column, if they select DMLSS, it's supposed to enter 0. The user clicks the Add button and it's added to a separate worksheet called LookupLists.

    Problem: When I run the userform from excel, it enters everything correctly except it doesn't enter anything in the 5th column. However, if I run the userform from the vba developer window (with excel open to the LookupLists worksheet), it enters all columns correctly. Also, if I try to enter 2 consecutive items, the 1st item will leave column 5 blank, but the 2nd item (once the focus has now moved to the worksheet LookupLists) it enters all 5 columns correctly. So I'm sure it's a focus issue, but I can't figure out why it's not working right. Any advice?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Worksheet focus problem, how do I set focus?

    Hi Michigan

    I'd suggest it's not looking at the correct Worksheet...

    Try this
    Please Login or Register  to view this content.
    or this
    Please Login or Register  to view this content.
    John

    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.

  3. #3
    Registered User
    Join Date
    07-19-2014
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4

    Re: Worksheet focus problem, how do I set focus?

    THANK YOU!!!! This worked!
    Please Login or Register  to view this content.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Worksheet focus problem, how do I set focus?

    You're welcome...

    This would also work
    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. Keep focus on Same Worksheet
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-20-2010, 10:06 AM
  2. ListView focus problem
    By Ron1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-07-2010, 07:29 AM
  3. [SOLVED] Spinner, worksheet focus problem
    By Ed in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-27-2006, 02:10 PM
  4. Option Button/Focus Problem on Worksheet
    By Resume Next in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-19-2005, 09:05 PM
  5. Complex focus problem
    By RB Smissaert in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2005, 10:05 AM

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