I need a macro that will execute a .bat file on my pc but certain criteria has to be met for this to happen ,,,the file needs to be executed only if :-
A1 = 0
A2 = A3
A2 >=A4+A5
Is this possible
cheers
I need a macro that will execute a .bat file on my pc but certain criteria has to be met for this to happen ,,,the file needs to be executed only if :-
A1 = 0
A2 = A3
A2 >=A4+A5
Is this possible
cheers
![]()
Sub ken() Dim s As String s = "x:\bats\ken.bat" With Worksheets("Sheet1") If .Range("A1").Value = 0 And .Range("A2").Value = .Range("A3").Value And _ .Range("A2").Value >= .Range("A4").Value + .Range("A5").Value Then _ Shell """" & s & """", vbHide End With End Sub
thanks
could i also use this method to say open a note pad file ect ?
thanks
could i also use this method to say open a note pad file ect ?
Yes.
![]()
Shell "cmd /c Notepad " & """" & "C:\myfiles\Excel\txtfiles\MyFile.txt" & """", vbHide
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks