Ok, I need help figuring out how to draw a random folder from the C drive, and then storing it to a variable, any ideas?
Printable View
Ok, I need help figuring out how to draw a random folder from the C drive, and then storing it to a variable, any ideas?
I would say...first get ALL folder into an array...
the do a count and random draw from the array.
add a DirListBox to your folder, set the visible prop to False, add a command button, and this code :
VB Code:
Private Sub Command1_Click() Randomize Timer Dir1.Path = "C:\" x = Int((Dir1.ListCount-1) * Rnd) MsgBox Dir1.List(x) End Sub
That would be easiest
:)
ok...fine..so that would work too :rolleyes:
:D
:D:D