Results 1 to 6 of 6

Thread: Solved: if odd even numbers

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #5
    VBAX Newbie
    Joined
    Sep 2016
    Posts
    2
    Location

    Post

    Sub Button2_click()
    Dim x As Integer
    Dim y As Integer
    x = InputBox("Please enter the Number")
    If x Mod 2 Then
    MsgBox "The Number is the Odd Number"
    Else
    MsgBox "The Number is the Even Number"
    End If
    End Sub
    Last edited by Aussiebear; 09-06-2016 at 02:42 AM. Reason: Added code tags to post and tidied up submitted post

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •