Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: How do I set a function key

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Trying to get input down to one key stroke, would like to set a function key to input time. Dave helped by informing me that current time can be captured by entering in CNTL+SHIFT+: Anyone know of a way to set a fuction key to these equivalent of these key strokes?

  2. #2
    Board Regular
    Join Date
    Apr 2002
    Posts
    113
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-04-10 06:28, mwillis wrote:
    Trying to get input down to one key stroke, would like to set a function key to input time. Dave helped by informing me that current time can be captured by entering in CNTL+SHIFT+: Anyone know of a way to set a fuction key to these equivalent of these key strokes?
    ' Workbook_Open function
    Sub SetKeys()
    Application.OnKey "{F2}", "mySub"
    End Sub

    ' Workbook_BeforeClose function
    Sub UnsetKeys()
    Application.OnKey "{F2}"
    End Sub

    Sub mySub()
    Application.SendKeys("^+:")
    End Sub

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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