Private Sub cmdAction_Click(index As Integer)
Dim VK_ACTION As Long
Select Case index
Case 1: '&H46 is the hex character code
'for the letter 'F' (ascii 70)
VK_ACTION = &H46
Case 2: '&H4D is the hex character code
'for the letter 'M' (ascii 77)
VK_ACTION = &H4D
Case 3: '&H52 is the hex character code
'for the letter 'R' (ascii 82)
VK_ACTION = &H52
Case 4: '&H5B is the hex character code
'for the start menu button
VK_ACTION = &H5B
Case 5: '&H5E is the hex character code
'for the caret chr (ascii 94)
VK_ACTION = &H5E
Case 6: '&H70 is the hex character code
'for the caret chr (ascii 112)
VK_ACTION = &H70
End Select
Call keybd_event(VK_LWIN, 0, 0, 0)
Call keybd_event(VK_ACTION, 0, 0, 0)
Call keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)
End Sub