+ Reply to Thread
Results 1 to 16 of 16

I need excel 2007 vba coding to tab enter between regular cells and combo boxes

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    I’ve created an excel document in version 2007 with the ribbon (see attached document, both sheets that start with the word "Acct") that has numerous combo boxes in it and I’m in need of coding so the user can either use the tab or enter key to exit out of the combo box, rather than having to click out of them with their mouse, after they are done entering data. (and if you’re wondering why I went to the headache of creating combo boxes when I could of just used a validation list, there are too many restrictions on validation lists, like no autofill, for one and I needed something that would allow for numerous hours of data entry with ease ) My ultimate dream come true would be to have the user start in the most left hand field and be able to tab or enter to move over to the field directly to the right, regardless of whether that field is a normal cell or a combo box. If it happens to be a combo box they land in, I'd like the tab or enter key to "activate" (for lack of a better word) the combo box so that they can then start typing and autofil will do the rest. When they are done entering data, I would then like them to be able to hit the enter or tab key again and have their cursor move to the next cell to the right. Basically I don't want them to have to use their mouse for anything unless they choose to select an item from the dropdown box located within the combo box.

    Anyway, I’ve researched online and understand that I need coding to use the tab and enter keys in a combo box. Problem is, I know NOTHING about code other than it exists (in fact if anyone posts a solution to this problem, you're probably going to give me detailed notes on how to get it in my document, as I don't even know how to do that )EXPENSE LOG TEST.xlsm I should probably mention that I’ve created nearly 500 combo boxes in this thing so it would be super helpful to have code that blankets the whole document (does this even exists?) rather than me having to go and individually attach the code to each combo box.


    Any help someone can provide would be greatly appreciated. I think I've spent about 50 hrs on this thing and 20 of it has been researching this problem, trying to get it to work on my own with code I found online. I'm tired and just want to be done with this project. Thanks!
    Last edited by lmisrasi; 03-07-2013 at 01:32 AM. Reason: SOLVED!

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hello lmisrasi,

    Welcome to the Form!

    When posting your workbook, please removing any protections prior to posting or supply the needed passwords in your post.

    I noticed on your worksheet you are using Data Validation Drop Downs. Although these look like Combo boxes, they are very different animals. There are 2 basic types of Combo boxes: Forms and ActiveX.
    The distinction is important to those reading your post. If a solution provided is for a Combo box, it will not work in your case. This will cause you more delays in solving your problem.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    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: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi lmisrasi

    Welcome to the Form!

    All the Code that's in Module1 belongs in the individual Worksheet Code Module in order for the Code to fire.

    I'd guess you're using Code from here
    http://www.contextures.com/xlDataVal11.html#Setup

    I'll post a sample tomorrow...it works...let me know how I can help.
    Last edited by jaslake; 03-03-2013 at 12:14 AM.
    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.

  4. #4
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi Leith, thank you for your response and willingness to help. Sorry about the protection.....I spaced I had the last sheet in the workbook password protected (which I wouldn't think would actually make a difference in this case since its not a sheet containing combo boxes, but anyhow, the password is iamtrouble). As for your other concerns, I'm not sure where on my spreadsheet its saying I'm using Data Validation Drop Downs. Can you tell me where you found this information? I did actually start this spreadsheet using data validation list, but when I realized that I couldn't control font size or have autofill in a validation drop down list, I went back and cleared the validation list and created a validation list in its place instead. And I did create a ActiveX type. Hopefully this clears up any confusion. Let me know if you need any more clarification. Sorry for any confusion I may have caused.

  5. #5
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi John, thank you so much for your replay and willingness to help me. I looked at the link and that is definitely the steps I went through to create the combo box, but I didn't do the code. Instead I linked the combo box, to my list by entering the range name of the list in the combo box's property page on the "liistfillrange" line. I also linked the combo box to the cell I placed it over. So maybe by not doing the code, I inadvertently skippped over getting the tab and enter key to work? I'm not sure? I did try to cut and paste some code I found online into the document, but honestly I know so little abouut this, I couldn't get it to work, so I decided to ask for help instead. I look forward to seeing what you come up with tomorrow and I'm crossing my fingers that it works!

  6. #6
    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: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi lmisrasi

    Play with the attached...see what works for you and what doesn't.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi John, I think your my hero. It does work, it works really well actually! I couldn't get the second sheet to work , the one titled Acct#54004. But I think it's just because you haven't put the code on that sheet. Is it as easy as copying the copy over to that sheet or will I mess it up if I do that? Thanks so much for your help with this, you have no idea what a relief this is!!!!

  8. #8
    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: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi lmisrasi

    The Code is in both worksheets as is the TempCombo. It works for me on both worksheets...can't imagine why you're having an issue.

  9. #9
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Okay, it's working. I think I've figured it out what I was doing wrong, sorry I should never work after midnight---it never turns out well for me. It does look like I can enter through all combo boxes on worksheet #54004 (btw, LOVE that it automatically opens the drop down, nice!) But my combo box I had in column M when I send the doc over is now missing? Can that be added back in easily? (It's the exact same as column N on sheet Acct#41004). Thank you again for all that you've done. You've been a huge help to me!

  10. #10
    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: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Hi lmisrasi

    Please notice in the attached...I added Data Validation to Column M of #54004 and then, in the Worksheet Module for #54004, changed this line of Code
    Please Login or Register  to view this content.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    thank you so much, it works perfectly now!

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  13. #13
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Arlu1201,

    Actually I did go in and mark my issue as resolved. I also clicked the star on Jaslake's last thread so he would get credit to his reputation for helping me and solving my issue. All of these things were taking place at I would say, around 12:04 am as my last comment to Jaslake telling him my issue was resolved was at 12:03 am. Your post telling me you were going to go in and close my question for me "this time" came in at 12:05 am, which means you were typing this out to me while I was doing all the appropriate steps to close out my question. Kind of a waste of your time to type all that out, just to go in and find out I'd marked it as resolved all ready, don't you think?

    May I make a suggestion of my own? In the future, a leeway time of more than two minutes would be appropriate for recently resolved threads. Perhaps you should target your focus to older threads? I may be new to this forum, but rest assured, I'm very capable of following simple instructions.

  14. #14
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    lmisrasi,

    This is a pre-set message so i didnt have to type it out. Sometimes 2 or more users tend to post at the same time as they wouldnt have refreshed the page while the other is posting. This is normal and happens here a lot.

    Thank you for taking the required steps to close the loop on this thread.

  15. #15
    Registered User
    Join Date
    02-27-2013
    Location
    West Bountiful, Utah
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    It doesn't surprise me at all that posts can cross each others paths when two people are responding to the same thread. It still doesn't change the fact that you shouldn't be closing loops for people in under 120 seconds. Target older ones that your are reasonably assured have been forgotten about.

  16. #16
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: I need excel 2007 vba coding to tab enter between regular cells and combo boxes

    Yeah, sorry...i wouldnt have checked the timing of your post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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