If Application.WorksheetFunction.Mod(b, 10) = 0 Then is returning "Object doesn't support property or method. b is dimensioned as an Integer, so I don't see what could be going wrong unless Mod isn't supported...
"Most worksheet functions that are not available as methods of the Application object have an equivalent Microsoft Visual Basic built-in operator or function. For example, the Mod() worksheet function is not available as a method of the Application object because there is an equivalent Mod operator built-in to Visual Basic."
But I already tried Mod(b, 10) without worksheetfunction in front.
Any suggestions?
Edit: Wait, never mind, I see what you did there.
Works great, thanks.