Is this normal?

J

Jenny

When I use the command:

ActiveWorkbook.VBProject.VBComponents
([ModuleName]).CodeModule.InsertLines(1, "Hello")

all of my active variables get reset as if the program is
being re-initialized. How do I prevent my variables from
getting reset when I insert text into modules?

~Jenny
 
H

Harald Staff

I believe it's perfectly normal. In programming, there's a strict
distinction between "design time" and "runtime", don't expect those to
interact at all for years to come. (Once that actually works you'll have a
"something" that programs itself due to its own experiences. Luckily it'll
probably also run on Windows and commit an unintended suicide :)

There must be a better way to achieve what you want done, like coding for
options "with Hello" and "without Hello".

Best wishes Harald
 
Top