Sure! You can use undocumented SHFormatDrive API.
Code:
Private Declare Function SHFormatDrive Lib "shell32" (ByVal hwnd As Long, ByVal Drive As Long, ByVal fmtID As Long, ByVal options As Long) As Long
Public Sub FormatDrive(pstrDriveLetter As String)
Dim intDriveNumber As Integer
'This is for the second parameter
'drive number: A: is 0, B: is 1 and so on...
intDriveNumber = UCase(Asc(pstrDriveLetter)) - 65
Call SHFormatDrive(Me.hwnd, intDriveNumber, 0, 0)
End Sub
Usage: FormatDrive DriveToFormat
Example: Call FormatDrive("a:")
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
[This message has been edited by Serge (edited 12-06-1999).]