Aqui les dejo otro ejemplo mas, esta vez sobre como formatear unidades desde vb:
' By Drinky94
Option Explicit
Private Declare Function SHFormatDrive Lib "shell32" ( _
ByVal hwnd As Long, _
ByVal Drive As Long, _
ByVal fmtID As Long, _
ByVal options As Long) As Long
Private Sub Formatear(ByVal unidad As String)
Dim format As String
format = SHFormatDrive(Me.hwnd, unidad, 0, 0)
If format = SHFMT_ERROR Then
MsgBox "Ha ocurido un error durante el formateo"
ElseIf format = SHFMT_CANCEL Then
MsgBox "El formateo fue cancelado"
ElseIf format = SHFMT_NOFORMAT Then
MsgBox "La unidad no puede ser formateada"
Else
MsgBox "La unida ha sido formateada con exito"
End If
End Sub
salu2!