# Three easy functions.

Im a beginner. I need to know how to create three funtions that will do this:
First Function:
Tells you if the number inputed is odd
Second Function:
Tells you the positoin of the alpahbet that the letter is inputed (i.e if the letter D is inputed then itll return 4)
Third Function:
Swap two variables using BelVal (what ever that is) Return boolean

Thanks for help!!!
###### Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Option Explicit

Private Sub Form_Click()
'Test
Dim a As Integer, b As Integer
a = 3
b = 4
Me.Print IsOdd(3)
Me.Print AlfaPos("a")
Me.Print "A="; a; "B="; b;
Call Swap(a, b)
Me.Print "Swapped: "; "A="; a; "B="; b;
End Sub

Private Function IsOdd(inum As Integer) As Boolean
IsOdd = Not (inum Mod 2)
End Function

Private Function AlfaPos(iLetter As String) As Integer
Dim alfa As String
alfa = "abcdefghijklmnopqrstuvwxyz"
AlfaPos = InStr(alfa, iLetter)
End Function

Private Function Swap(ByRef a As Integer, ByRef b As Integer) As Boolean
Dim tmp As Integer
tmp = a
a = b
b = tmp
Swap = True
End Function

Is this what you want?
0

Experts Exchange Solution brought to you by