Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Macro Help (2007)

    I would like to know can you program a macro to simulate pressing the ALT key.

    I would like to attach the macro to custom button on a toolbar, but cannot find anything for the ALT key.
    Easy Access

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Help (2007)

    What exactly would you like to accomplish? Pressing the Alt key by itself doesn't do much...

  3. #3
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Macro Help (2007)

    I am running Office 2007 on Vista and when you press the ALT key you get options to perform other functions (See attached screen shot). I would like my macro to run thes options that are activated by the ALT key.
    Attached Images Attached Images
    Easy Access

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Macro Help (2007)

    Try the SendKeys action with % as argument - % is the code for Alt when using SendKeys.

    The VBA equivalent would be

    SendKeys "%"

  5. #5
    2 Star Lounger
    Join Date
    Aug 2002
    Location
    Minneapolis, MN, Minnesota
    Posts
    162
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Macro Help (2007)

    Thank you Hans, as always your help is much appreciated!
    Easy Access

Posting Permissions

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