Is it possible to make the Button execute two or more actions?

According to the help:

Button[label,action]

Is it possible to make the button execute two actions?

-

Look at CompoundExpression :

Button["Click Here", Print[10!]; Print[11!]]

 "Click Here"


when clicked it performs two actions

3628800
39916800

-
Thanks for it, I didn't know about the existance of compoundEpression. –  Vÿska Jul 6 '12 at 11:04

Use CompoundExpression, which will be more familiar in the form of the ; operator (which many wouldn't recognize as an operator at all).

This works anywhere where a single command seems to be called for in a syntax description. CompoundExpression returns the result of the last operation or Null if there isn't any.

-
Thanks for the answer. –  Vÿska Jul 6 '12 at 11:05

Module[] while a bit longer seems to work too:

Button["Click Here", Module[{}, {Print[10!], Print[11!]}]]

-
Module is unecessary here: you simply use List to substitute CompoundExpression. –  István Zachar Jul 6 '12 at 12:39
@IstvánZachar - List works great, I just thought that Module might provide more flexibility to do more things than Print. The OP asked "Is it possible to make the button execute two actions?" "...two actions?" covers lots of possible ground. –  Jagra Jul 6 '12 at 13:59
@Jagra Please try Button["Click Here", {Print[10!], Print[11!]}] and Button["Click Here", Print[10!]; Print[11!]]. Module does nothing in this case. –  Alexey Popkov Jul 6 '12 at 14:18