Using Tab key to move to next Text Box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • svwsysadmin
    New Member
    • Jan 2008
    • 3

    Using Tab key to move to next Text Box

    Our company received an Excel file that had Text Boxes to enter values and you could hit tab to move directly to the next Text Box once done entering data in the current Text Box.

    When our company switched to Office 2007, Excel stopped showing this behavior. How can I get it back? Near as I can tell the original file has no Macros. I have tried deleting all the Text Boxes and making new ones, but I don't know a Macro to make the Tab thing occur like it used to.
  • kadghar
    Recognized Expert Top Contributor
    • Apr 2007
    • 1302

    #2
    Originally posted by svwsysadmin
    Our company received an Excel file that had Text Boxes to enter values and you could hit tab to move directly to the next Text Box once done entering data in the current Text Box.

    When our company switched to Office 2007, Excel stopped showing this behavior. How can I get it back? Near as I can tell the original file has no Macros. I have tried deleting all the Text Boxes and making new ones, but I don't know a Macro to make the Tab thing occur like it used to.
    There's no need of macros to do this. The 'Tab Thing' (i liked that name) should be a property of the text boxes. TabStop property should be set to True, and it must have a TabIndex (that is the order the tab key follows)

    Now, in Vista, many features were removed, im affraid i cannot check them right now, but i hope (hope so badly) this is not one of those.

    Comment

    • kadghar
      Recognized Expert Top Contributor
      • Apr 2007
      • 1302

      #3
      oh, i forgot to tell you. In case this is not longer a feature, you can always do it with VBA, in the KeyDown event of each Textbox, something like

      [CODE=vb]if keycode=9 then '9 is the code of Tab key
      ActiveSheet.Sha pes("text box 2").Select 'or whatever textbox you want to be selected when you press Tab from this text box
      end if[/CODE]

      well, HTH

      Comment

      • svwsysadmin
        New Member
        • Jan 2008
        • 3

        #4
        Alright, well I have no idea how to set the Tab Stop and Tab Index in Excel 2007. I don't see those properties or options anywhere.

        Luckily this is not Vista, Office 2007 in running in XP. Just to clarify, this file is a workbook with 3 worksheets in it. Each sheet has a few pictures inserted and inserted overtop of the pictures are text boxes to enter dimensions (the pic shows measurements and the text boxes have the exact values).

        It is not a form or anything. If it comes down to using the VBA method, is that scripting for the entire workbook, sheet, or each Text Box?

        Comment

        • kadghar
          Recognized Expert Top Contributor
          • Apr 2007
          • 1302

          #5
          Originally posted by svwsysadmin
          Alright, well I have no idea how to set the Tab Stop and Tab Index in Excel 2007. I don't see those properties or options anywhere.

          Luckily this is not Vista, Office 2007 in running in XP. Just to clarify, this file is a workbook with 3 worksheets in it. Each sheet has a few pictures inserted and inserted overtop of the pictures are text boxes to enter dimensions (the pic shows measurements and the text boxes have the exact values).

          It is not a form or anything. If it comes down to using the VBA method, is that scripting for the entire workbook, sheet, or each Text Box?
          Noup, im affraid to tell you i've just searched in the Object Browser for any key down, press or up event in the excel sheet, book or shapes, and there're no such things. There are some events like Change or SelectionChange that could be useful, simulating a Timer with DoEvents and registering the keycodes each time, but i think that will be a little bit more complicated (and not realy sure if they're possible using VBA).

          I'll keep subscribed here in case someone else knows a better solution, (since it sounds like a common problem).

          Comment

          • Killer42
            Recognized Expert Expert
            • Oct 2006
            • 8429

            #6
            I'd just like to check something. You've told us what the new version isn't doing. But what is it doing instead?

            Comment

            • svwsysadmin
              New Member
              • Jan 2008
              • 3

              #7
              Well this is odd. Instead of the text boxing growing as you type horizontally, they grow vertically. So if I type "the" it looks like this:

              t
              h
              e

              and pressing TAB doesn't move to the next Text Box. Instead it move to the next line vertically as well. Now I tried deleting all existing Text Boxes and creating new ones. Once I did that I could now type with the box autosizing horizontally, like it used to. But hitting TAB then doesn't go to the next Text Box. Instead it just makes the autosizing box bigger like an actual indent has been placed in it.

              Comment

              • Killer42
                Recognized Expert Expert
                • Oct 2006
                • 8429

                #8
                Sorry, I've gotten a bit lost in this thread. Do you think you could give us a brief description of the exact details of what you did, which resulted in the vertical text?

                Also, something else just came to mind. Have you checked the compatibility options in Excel to see whether there's a setting which will make it behave in the old manner? Maybe you won't need to change anything, after all.
                Last edited by Killer42; Feb 12 '08, 02:40 AM.

                Comment

                Working...