I have a variable c of currency type (with value around 5 billion)when I use commandd= c mod 1000d is long typeI get overflow error. Is there a way to get around it?
Yep, looks as though you've hit the limit.You probably need to do it from first principles:c - Int(c / 1000) * 1000