B
Brad Granath
I'm trying to get a ListBox to display a directory list when the user chooses
a drive letter from a ComboBox. This is my code:
Private Sub Combo7_Change()
Dim di As DirectoryInfo
di = New DirectoryInfo("Combo7.Value")
List0.RowSource = di.GetDirectories()
End Sub
However, the compiler takes offense at the "di = New
DirectoryInfo("Combo7.Value")" line, caiming that it "expected end of
statement." I've included mscorlib in the references. It's been a long time
since I fooled around with constructors and the like, and never in VB, so I
have no clue if I'm breaking some simple syntax rule.
Any ideas?
a drive letter from a ComboBox. This is my code:
Private Sub Combo7_Change()
Dim di As DirectoryInfo
di = New DirectoryInfo("Combo7.Value")
List0.RowSource = di.GetDirectories()
End Sub
However, the compiler takes offense at the "di = New
DirectoryInfo("Combo7.Value")" line, caiming that it "expected end of
statement." I've included mscorlib in the references. It's been a long time
since I fooled around with constructors and the like, and never in VB, so I
have no clue if I'm breaking some simple syntax rule.
Any ideas?