+ Reply to Thread
Results 1 to 4 of 4

eypress to activate VB-code

  1. #1
    Registered User
    Join Date
    02-11-2009
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    26

    eypress to activate VB-code

    I have this simple Spreadsheet for timekeeping (cross country skiing). It has a simple CommandButton1 to activate some VB-code:

    Please Login or Register  to view this content.
    But is there a way to activate this script with a simple keypress, ie F12?
    Attached Files Attached Files
    Last edited by arlu1201; 03-19-2013 at 06:41 AM. Reason: Use code tags in future.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: eypress to activate VB-code

    Go to macro option and assign F12 to the code

  3. #3
    Registered User
    Join Date
    02-11-2009
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: eypress to activate VB-code

    Quote Originally Posted by AB33 View Post
    Go to macro option and assign F12 to the code
    I'm afraid I need a bit more guidance...

    Do you mean from this control?:

    Private Sub CommandButton1_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)

    End Sub

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: eypress to activate VB-code

    Alt+F8 will take to a new page where you need to choose the name of the code, then on the right hand side you see menus, one of them is option. When you click the option, you will see short-cut keys

  5. #5
    Registered User
    Join Date
    02-11-2009
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    26

    Re: eypress to activate VB-code

    Quote Originally Posted by AB33 View Post
    Alt+F8 will take to a new page where you need to choose the name of the code, then on the right hand side you see menus, one of them is option. When you click the option, you will see short-cut keys
    Thanks for Your reply, but there are no "Macros" (only a VB-script) in this Sheet. And If I choose this option, I need to press Ctrl+F12. I was looking for a single keypress option.

    Thanks!

    ruttian

+ 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