Option Explicit dim x,y,i,f y = vbyes f = 0 i = 1 do Until y = vbno x = inputbox(" Enter a Number"," Hello Merian",2) if x <> "" and IsNumeric(x) then for i = 2 to x\2 if x mod i = 0 then f = 1 exit for end if next if f = 0 then msgbox " The Number " & x & " is a Prime number ",,"Result" if f = 1 then msgbox " The Number " & x & " is NOT a Prime Number ",,"Result" f = 0 y = MsgBox (" Another number ? ",vbYesNo," Hello Merian") else y = MsgBox (" Wrong Value!!, Another Number ? ",vbYesNo," Hello Merian") end if loop