Help me with Visual Basics (VBA) please:?
Relating to an assignment in order to complete and I have no idea how that will program this, please assist.It’s inside Visual Essentials:
Ask an individual to type in a quantity (use InputBox).Test in the event the number is definitely equal or unequal.In the event the number is usually equal a new message (use MsgBox) should appear that states that this number will be equal and when the number is unequal the message should state the number is usually unequal.
A number is the same if it could be divided by way of two with no remainder (or modus), thus this remainder ought to be equal to help zero.(Hint:number Mod divisor = 0 is the test)
Plan no 2:
Please assistance with this one in the process:
Provide the mouse a descriptive name.
Next Wednesday, EIGHTEEN May, will be election day.You could vote should you be 18 or older.The IEC asked you help these.A human being must key in his/her yr of birth and labor (use InputBox) as well as a message should appear which in turn states whether anybody may vote or even not and the message might also want to give the age of the man.
If 1992 is typed in, the pursuing message have to appear:May possibly vote.Grow older:19
If 2000 is typed in, the pursuing message have to appear:May not vote.Grow older:11
Tip:To convert several to wording use + CStr(variable name)
1.
gray number when double
gray remainder when double
variety = InputBox(“Input the Number”)
remainder = variety mod 2
if remainder = 0 then
messagebox.show(“your variety is even”)
else
messagebox.show(“your variety is odd”)
conclusion if
ONLY TWO.
gray CurrentYear since integer = 2010
gray BirthYear since integer
gray Age when integer
BirthYear = InputBox(“What 12 months were anyone born”)
Grow older = CurrentYear :BirthYear
if Age >= 18 then
messagebox.show(“May vote.Grow older:” & Age)
Else
messagebox.show(“May not necessarily vote.Grow older:” & Age)
endif.
Leave a Reply
You must be logged in to post a comment.