Are you using the stock screenset?
If so, go to the Operator menu, and choose "Edit Button Script". Then click the Ref All button, and the script editor should open.
To Home an individual axis, use DoButton(x). Axis numbers are as follows:
X=22
Y=23
Z=24
A=25
B=26
C=27
example:
To Home Z, then X, then Y, the script would be:
DoButton(24)
DoButton(22)
DoButton(23)
To Home multiple axis' at the same time, use RefCombination(x). Add the axis codes together to get the value to use.
X=1
Y=2
Z=4
A=8
B=16
C=32
example:
To home X and Y together, then Z, use:
RefCombination(3)
DoButton(24)