i'm making a key code so when someone hits the button 'A' on their keyboard, my program will go to http://www.aol.com (for example) .. this is what i have:


Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
'If different Keys are pressed then set the URL to different websites
If KeyCode = vbKeyA Then URL = "www.vb-world.net"
If KeyCode = vbKeyUp Then URL = "www.hotmail.com"
If URL <> "" Then
'Open the website specified in URL in WebBrowser1
WebBrowser1.Navigate URL
End If
End Sub


And I also tried:

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 97 Then WebBrowser1.Navigate("http://www.aol.com")
End Sub

i hope these 2 are even close, but both didn't work..
plz tell me whats wrong..

((VB 6))