0

I've been learning all the nifty tools I have to debug in the VBA editor for excel, but I can't figure out if there's a way to have watches stay set for a project even if its closed/reopened until I remove them. Im doing a lot of stepping-in, etc. while Im learning, and while having watches really helps, its annoying that every time I close/open a file, I have to reset all the watches. This is really annoying when I have several variables I want to keep track of while debugging, say, a Workbook_Open event and I'm closing/opening a lot!

Is there a way to turn on watches for a module or project so they come back on when the project is closed and re-opened? Or do I have to set them manually every...single...time...?

J_Nyiri
  • 61
  • 6
  • https://stackoverflow.com/questions/33674916/how-can-i-save-vba-watches-manually-or-add-them-via-code – Vitalizzare May 12 '22 at 18:34
  • 1
    I suppose this does answer it, but certainly wasn't the answer I was hoping for! Seems pretty complicated but I'll try the ideas there (which I barely understand most of!) and see if any of them are simple enough/reasonable for regular use. Thanks – J_Nyiri May 12 '22 at 18:57

1 Answers1

0

I have a similar requirement.

My proposal was "print" variables in columns in new sheet [with name LOG]. I can save values / times and result and shared that with my team.

Steps:

  • Define breakpoints
  • Insert new line in LOG sheet
  • Save Values and date time
  • Compare results

Regards

Carlos J.
  • 55
  • 7