calling two functions sequentially in vbscript with single click event
- by sushant
i need to call two function on a single click event. and also the functions shud get executed sequentially. i tried click me . but its not working.its not calling any of the functions.
here is the complete code. sorry for formatting.
function copy()
Dim WshShell, oExec,g,h
h="D:\d"
g="xcopy " & h & " " & "D:\y\ /E"
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec(g)
Do While oExec.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExec.Status
end function
function zip()
Dim WshShel, oExe
Set WshShel = CreateObject("WScript.Shell")
Set oExe = WshShel.Exec("cmd /c cd D:\d & D: & winzip32.exe -min -a D:\a")
Do While oExe.Status = 0
WScript.Sleep 100
Loop
WScript.Echo oExe.Status
end function
click me
any help is appreciated.