Formating disk A command button


Posted by Marley on December 23, 2001 7:49 AM

Hi to all,

I'd like to create a button "formatDrive A": using the Win2000'dll path as this one running under win 95/98:

"ValRetour = Shell("C:\WINDOWS\RUNDLL32.EXE shell32,SHFormatDrive", 1)"

Can yu help me ?
Thanks in advance

Posted by Ivan F Moala on December 23, 2001 8:04 PM

Try this as you haven't declared the SHformatDrive

Private Declare Function SHFormatDrive Lib "shell32" _
(ByVal hwndOwner As Long, ByVal iDrive As Long, _
ByVal iCapacity As Long, ByVal iFormatType As Long) As Long

Private Sub Format_ADrive()
SHFormatDrive 0, 0, 0, 1
End Sub

Ivan



Posted by Marley on December 25, 2001 7:46 PM

Thanks Ivan

Thanks so much. It's works fine
Marley