0

Global variables are modular-level objects and retain assignments after procedures run, however, if excel is closed without resetting END, does the lifespan of a global persist in memory until a future time it is declared or invoked?

Needing to make explicitly clear in my mind this is a FALSE claim.

Release/free vs Purge Global/Public Variables from memory - Excel VBA was a helpful article, but am seeing some strange results possibly contradicting my belief.

  • Not sure what you mean by *resetting `END`*, but when the host application (excel in this case) is closed, the process it resides is teared down and the memory it occupies is reclaimed by the operating system. That means there's no way to go back and read the value of a public variable. When a new instances of excel is created, any public variables will only contain their default value. – Kostas K. Feb 15 '23 at 10:40
  • Thank you @KostasK. Your explanation is clear. END is the statement terminating a procedure and clears all variables. – Geoffrey Turner Feb 15 '23 at 11:41

0 Answers0