# Suppress the output from Monitor command

I am working on keeping track of a calculation using progressindicator and monitor. I want the progress bar inside an user interface therefore I want to suppress the output from the monitor command without getting null statement. A simple example is where I have the output

Monitor[Table[Length[FactorInteger[2^n - 1]], {n, 50, 200, 15}], n]


and when I get null

Monitor[Table[Length[FactorInteger[2^n - 1]], {n, 50, 200, 15}], n;]


I am taking the value of n and use inside my progressindicator. I have more elaborate "toy" problem if you want to see why I am trying to do that.

Any ideas how I can suppress the output but still keep track of the calculation.

Thank you

• would a method to activate and deactivate at will the Monitor be a solution? I mean to prevent the code to be inside of a Monitor at all, when needed – glS Nov 1 '16 at 17:26
• see this question for example – glS Nov 1 '16 at 17:28
• I read it but I think your question little different than mine. My goal is here I always want to monitor. My goal is to take the n from a package and use inside user interface to update the progressindicator. But when suppress the output I have "Null" appearing under my user interface and if I don't suppress it I see the value of n. Both I don't want it. Also you question is quite interesting. The answer is little to advance for my mathematica knowledge but I will play with it to learn. – Erdem Nov 1 '16 at 22:02