문제

I want to format a drive from visual basic application. Can anybody help me with it ? I have tried shFormat(), but it is not completing my task. And If I Format my drive through CMD, it should be a background process for my application.

도움이 되었습니까?

해결책

You could call a cmd from vba to execute the format command e.g.

Dim cmd_str As String
cmd_str = "cmd.exe /C format f:"
Call Shell(cmd_str, vbNormalFocus)

obviously the example above is for drive f:, change this as needed.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top