Yep, put this in the button and it should work.
If GetOemLED(807) and GetOemLED(808) and GetOemLED(809) Then
MsgBox"Axes not referenced, home axes and try again"
Else
Code "G53G0Y0"
End If
That is assuming you have X Y and Z axes, if not then remove the one you dont have, X is 807 Y808 etc.
Hood