Hi,
I want to do exactly what has been stated by this person (Alan - see link below), just that I am using MS Excel instead of MS-Access.
Can anyone tell me how the reply#5 would have helped? It seems he got it to work with that option.
Shell "cmd.exe /c <yourcommand> "
I am trying the following code -
But I get a runtime error on the line "y = Shell...."
Maybe a very basic question, but I do not know how it will work :-(
Any help will be greatly appreciated.
Thanks
Satish
I want to do exactly what has been stated by this person (Alan - see link below), just that I am using MS Excel instead of MS-Access.
Can anyone tell me how the reply#5 would have helped? It seems he got it to work with that option.
Shell "cmd.exe /c <yourcommand> "
I am trying the following code -
Code:
Private Sub CommandButton1_Click()
Dim x
Dim y
Dim z As String
z = "dir E:\Satish /a:d /b /s>dirs.txt "
x = Shell("D:\windows\system32\cmd.exe", 1) 'open command prompt
y = Shell("cmd.exe/c z") 'execute the DOS command to write to the file dirs.txt
End Sub
Maybe a very basic question, but I do not know how it will work :-(
Any help will be greatly appreciated.
Thanks
Satish
Comment