Nov 1, 2002 #1 bjwade62 Programmer Oct 31, 2002 15 US I want to be able to select a folder in the dirlistbox, then hit the enter key and have it open the folder. I've tried the keydown event but no luck. Can anyone help? Thanks, Bernie
I want to be able to select a folder in the dirlistbox, then hit the enter key and have it open the folder. I've tried the keydown event but no luck. Can anyone help? Thanks, Bernie
Nov 1, 2002 1 #2 Foada Programmer Feb 4, 2002 1,110 US Give this a try Option Explicit Dim sPath As String Private Sub Dir1_Click() sPath = Dir1.List(Dir1.ListIndex) End Sub Private Sub Dir1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Dir1.Path = sPath End Sub Let me know if this helps. If you choose to battle wits with the witless be prepared to lose. Upvote 0 Downvote
Give this a try Option Explicit Dim sPath As String Private Sub Dir1_Click() sPath = Dir1.List(Dir1.ListIndex) End Sub Private Sub Dir1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then Dir1.Path = sPath End Sub Let me know if this helps. If you choose to battle wits with the witless be prepared to lose.
Nov 1, 2002 Thread starter #3 bjwade62 Programmer Oct 31, 2002 15 US Worked Great! Thanks alot! Upvote 0 Downvote