Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format partition by vba code

ameedoo3000

IS-IT--Management
Sep 20, 2016
232
0
16
EG
hello every body
i want to know how to format any partition in my hard disk by vba code from my access database
thanks
 
Dim cmd As String
cmd = "cmd.exe /C format f:"
Call Shell(cmd, vbNormalFocus)
 
May I ask a simple question? - Why would you want to do this?
 
Fledgling malware writer? :D
Well that is one possibility. However I was more interested in what business requirement there woudl be for having any application (Access or not) formatting a partition. If any app did that to a system of mine, I'd be somewhat less than pleased!
 

Part and Inventory Search

Sponsor

Back
Top