+ Reply to Thread
Results 1 to 5 of 5

Coding For The Return Key

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183

    Question Coding For The Return Key

    Hello, what is the proper coding in vba that executes the keyboard's 'Return' or 'Enter' key?

    And also, would the 'F' keys be represented as they are in vba eg. F5, F8, F10 etc. ?

    I want to run a code that will execute 'F5' followed by the 'Enter' or 'Return' key.

    Thanks for any help on this...
    Last edited by Mhz; 02-02-2007 at 07:15 AM.

  2. #2
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by Mhz
    Hello, what is the proper coding in vba that executes the keyboard's 'Return' or 'Enter' key?

    And also, would the 'F' keys be represented as they are in vba eg. F5, F8, F10 etc. ?

    I want to run a code that will execute 'F5' followed by the 'Enter' or 'Return' key.

    Thanks for any help on this...
    untested, but try

    Application.SendKeys("F5")

    Application.SendKeys("~")

    or

    Application.SendKeys("ENTER")

    for the numeric keypad enter.

    hth
    ---
    Si fractum non sit, noli id reficere.

  3. #3
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    Application.SendKeys "{F5}", True
    Application.SendKeys "{ENTER}", True
    HTH
    Carim


    Top Excel Links

  4. #4
    Forum Contributor
    Join Date
    07-02-2006
    Location
    Love City, USA
    Posts
    183
    THANKS VERY MUCH! I got it to function Properly

    Wanted to create buttons that would return to previous pages..Works good..

    Thanks Alot.

  5. #5
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Glad it fixed your problem

    Thanks for the feedback

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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