i've never used visual basic, but i'd guess what you want would look something like this:If SomeVariable Mod b ' some code goes hereEnd If