VERSION 2.00
Begin Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Choose Directory"
ClientHeight = 2535
ClientLeft = 1125
ClientTop = 1845
ClientWidth = 6630
ControlBox = 0 'False
Height = 3060
Icon = 0
Left = 1065
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2535
ScaleWidth = 6630
Top = 1380
Width = 6750
Begin DirListBox Dir1
Height = 2280
Left = 120
TabIndex = 3
Top = 120
Width = 3255
End
Begin DriveListBox Drive1
Height = 315
Left = 3480
TabIndex = 2
Top = 120
Width = 3015
End
Begin CommandButton Command2
Cancel = -1 'True
Caption = "Cancel"
Height = 615
Left = 5040
TabIndex = 1
Top = 1800
Width = 1455
End
Begin CommandButton Command1
Caption = "Ok"
Default = -1 'True
Height = 615
Left = 3480
TabIndex = 0
Top = 1800
Width = 1455
End
End
Option Explicit
Sub Command1_Click ()
' Store the selected directory in the form's Tag
Form1.Tag = Dir1.List(Dir1.ListIndex)
Form1.Hide
End Sub
Sub Command2_Click ()
' Store a null string in the form's tag, indicating cancel
Form1.Tag = ""
Form1.Hide
End Sub
Sub Drive1_Change ()
On Error GoTo BadDrive
Dir1.Path = Left$(Drive1.Drive, 2)
Exit Sub
BadDrive:
Msg = "Drive " + Drive1.Drive + " not available."
MsgType = MB_ICONSTOP
MsgBox Msg, MsgType, MsgTitle
Exit Sub
End Sub