View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
beeawwb[_3_] beeawwb[_3_] is offline
external usenet poster
 
Posts: 1
Default Multiple commands from single IF.

Now, I know if I write some functions then this will be alot easier, bu
I want to do some IF's that run multiple commands. It should be quit
easy, but I don't know what Excel wants.

Here's an example of how I "think" it, when I'm doing this in my head.

IF (Condition = True)
Then
{
Command1
Command2
Command3
}
Else
{
Command4
Command5
}


I suppose the function way to do it would be

If (Condition = True) Then Truestuff() Else Falsestuff()

With
Sub Truestuff()
Command1
Command2
Command3
End Sub

Sub Falsestuff()
Command4
Command5
End Sub

That's the other way I can do it. Is there any way to nest multipl
commands in a single If Then Else set?

Hope that makes sense, Thanks for the help.

-Bo

--
Message posted from http://www.ExcelForum.com