Thread: Static variable
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RobcPettit[_2_] RobcPettit[_2_] is offline
external usenet poster
 
Posts: 108
Default Static variable

Hi, In one sub Im using a static variable to keep count. With this Im
using a timer to run through the macro at certain intervals. On a
userform I use 2 command buttons, one to start the timer and another
to stop the timer. This all works well apart from when I stop the
timer, then restart my Static continues from its last count. In the
sub with the static variable I can use 'Erase whatever'. Because the
Stop command does not execute that sub, is there a way to globally
clear the static variable without closing the workbook.
Regards Robert