if - then actions  
Author Message
chris051865





PostPosted: Sun Feb 10 09:20:00 CST 2008 Top

Excel Programming >> if - then actions

hi all, i need to make this work..
if condition "true",
then launch an exe file on disk and write 0 (zero) in a B1 cell..
ty if u can help me

Excel133  
 
 
N





PostPosted: Sun Feb 10 09:20:00 CST 2008 Top

Excel Programming >> if - then actions hmm forgot the notify of replies !



> hi all, i need to make this work..
> if condition "true",
> then launch an exe file on disk and write 0 (zero) in a B1 cell..
> ty if u can help me
 
 
MikeH





PostPosted: Sun Feb 10 09:23:01 CST 2008 Top

Excel Programming >> if - then actions Despite having not too much to go on, this may get you going in the right
direction.

Sub ordinate()
If 1 = 1 Then 'set you own condition here
Shell "Notepad.exe"
Range("B1").Value = 0
Else
'and now for something diferent
End If

End Sub


Mike



> hi all, i need to make this work..
> if condition "true",
> then launch an exe file on disk and write 0 (zero) in a B1 cell..
> ty if u can help me
 
 
GarysStudent





PostPosted: Sun Feb 10 09:28:01 CST 2008 Top

Excel Programming >> if - then actions Sub demo()
Dim WhatIsTruth As Boolean
WhatIsTruth = True
If WhatIsTruth Then
x = Shell("cmd.exe /c C:\Userguide.exe", 1)
Range("B1").Value = 0
End If
End Sub
--
Gary''s Student - gsnu200768




> hi all, i need to make this work..
> if condition "true",
> then launch an exe file on disk and write 0 (zero) in a B1 cell..
> ty if u can help me
 
 
JLGWhiz





PostPosted: Sun Feb 10 09:32:00 CST 2008 Top

Excel Programming >> if - then actions If myCondition = True Then
ActiveSheet.Range("B1") = "0"
ChDrive "A"
Call myFile.exe
End If

Use string zero so it will display.



> hmm forgot the notify of replies !
>

>
> > hi all, i need to make this work..
> > if condition "true",
> > then launch an exe file on disk and write 0 (zero) in a B1 cell..
> > ty if u can help me
 
 
N





PostPosted: Sun Feb 10 09:38:01 CST 2008 Top

Excel Programming >> if - then actions i can't start it now , thanks for help, i will try both as soon as possible
the condition is a generic ..if A1 = TRUE

so it should sound like this..

Sub demo()
Dim A1 As Boolean
A1 = True
If A1 Then..

..end sub




> Sub demo()
> Dim WhatIsTruth As Boolean
> WhatIsTruth = True
> If WhatIsTruth Then
> x = Shell("cmd.exe /c C:\Userguide.exe", 1)
> Range("B1").Value = 0
> End If
> End Sub
> --
> Gary''s Student - gsnu200768
>
>

>
> > hi all, i need to make this work..
> > if condition "true",
> > then launch an exe file on disk and write 0 (zero) in a B1 cell..
> > ty if u can help me