avec shell tu lances un commande dos que tu redirige vers un fichier
exemple :
shell("%SystemRoot%\system32\cmd.exe /a /c " & chr(34) & "%SystemRoot%\system32\net localgroup mongroupe" & chr(34) & " > C:\a.txt",1)
%SystemRoot%\system32\cmd.exe => lance l'invite de commandes
%SystemRoot%\system32\net localgroup => lance la commande
> C:\a.txt => redirige le resultat vers un fichier