The Drive Combo box lists all the available drives on the PC. It's properties are almost identical to a Combo Box, except that it has a Drive property, and no Style property.
To get or set the current drive, use the Drive property:
Drive1.Drive = "C:"
or
Msgbox "The current drive is " & Drive1.Drive
When the current drive has changed, the Change event occurs. Note that when the drive changes, the control does not attempt to access it... so if there is no disk in the drive, it does not matter. (This will not be the case when we use the 3 controls together, and the Folder/Files list boxes attempt to read the disk!)
Comments