in form load:
VB Code:
  1. Dim NumOfRuns as integer
  2. NumOfRuns = Val(Getsetting("APPNAME","DATA","RUNS","0"))
  3. NumOfRuns = NumOfRuns + 1
  4. SaveSetting "APPNAME", "DATA", "RUNS", NumOfRuns
  5. 'Check for too many...
  6. if NumOfRuns > 15 then Msgbox "You have run this more than 15 times"    
  7. 'etc..