Consulting

Results 1 to 13 of 13

Thread: Automate Menu Options Insert - Name - Define

  1. #1
    Site Admin
    The Princess
    VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location

    Automate Menu Options Insert - Name - Define

    The minute I use this macro (which I made myself, I might add!), it brings up the dialog, and I put a name in and say OK...

    Sub MakeName()
    Application.Dialogs(xlDialogDefineName).Show
    End Sub
    Then, my arrow keys don't work no more!!
    What's up with that?

    Anybody else?
    ~Anne Troy

  2. #2
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    What macro?

  3. #3
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    What? You can't see the macro I put up there? (hee hee, sorry!!)
    ~Anne Troy

  4. #4
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    I tried running the macro from a button and Tools | Macro | Macros... and added a name and pressed Ok. After that my arrow keys still work fine and I can move around to different cells.

    Excel 2003.

  5. #5
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    MAYBE it's cause I have assigned it to a textbox from the drawing toolbar? Mind testing? Hmm...I'll test in 2003 while I'm at it.

    Doh! I am in 2003
    ~Anne Troy

  6. #6
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Quote Originally Posted by Dreamboat
    The minute I use this macro (which I made myself, I might add!), it brings up the dialog, and I put a name in and say OK...

    Then, my arrow keys don't work no more!!
    What's up with that?

    Anybody else?
    Nope, worx fine on mine (2000)...
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  7. #7
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    Wow, that is a very strange error. After running the macro from a Drawing Toolbar Text Box the arrow keys break.

    Maybe the Text Box keeps the focus even though I can select another cell with the mouse and still cannot use the arrow keys.

  8. #8
    Site Admin
    Urban Myth
    VBAX Guru
    Joined
    May 2004
    Location
    Oregon, United States
    Posts
    4,940
    Location
    Why can't you just use the keyboard shortcut: Ctrl + F3 ?? (That's what I use.)

  9. #9
    Site Admin
    Jedi Master
    VBAX Guru Jacob Hilderbrand's Avatar
    Joined
    Jun 2004
    Location
    Roseville, CA
    Posts
    3,712
    Location
    That's two buttons. She wants to be more efficient and reduce that to one click.

  10. #10
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    I think this one goes into the Excel Twilight Zone file, however I found a solution!


    Sub MakeName()
        Application.Dialogs(xlDialogDefineName).Show
        Application.TransitionNavigKeys = Not Application.TransitionNavigKeys
        Application.TransitionNavigKeys = Not Application.TransitionNavigKeys
    End Sub

    This sets the Transition Navigation Keys option (Tools, Options, Transition) to the opposite of its current setting, then back again. No idea why it should work but it does

  11. #11
    Administrator
    Chat VP VBAX Guru johnske's Avatar
    Joined
    Jul 2004
    Location
    Townsville, Australia
    Posts
    2,872
    Location
    Quote Originally Posted by geekgirlau
    I think this one goes into the Excel Twilight Zone file, however I found a solution!


    Sub MakeName()
    Application.Dialogs(xlDialogDefineName).Show
    Application.TransitionNavigKeys = Not Application.TransitionNavigKeys
    Application.TransitionNavigKeys = Not Application.TransitionNavigKeys
    End Sub

    This sets the Transition Navigation Keys option (Tools, Options, Transition) to the opposite of its current setting, then back again. No idea why it should work but it does

    Hi geekgirl,
    Good one! But I found the second iteration not necessary (2000)... Let's see if it's the same for the others...
    John
    You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you

    The major part of getting the right answer lies in asking the right question...


    Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.

  12. #12
    Site Admin
    The Princess VBAX Guru Anne Troy's Avatar
    Joined
    May 2004
    Location
    Arlington Heights, IL
    Posts
    2,530
    Location
    VERY interesting!!

    I'm working on a project where I may be inserting bunches of named ranges, so I just GOTTA have the button...
    ~Anne Troy

  13. #13
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    Hi John,

    The purpose of the second iteration is to reset back to the original transition keys setting.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •