One of simplest possible custom functions
Function GetMyFavoriteColor() GetMyFavoriteColor = "Magenta" End Function Sub mSub() MsgBox GetMyFavoriteColor() End Sub