A
Andrew Cushen
Hi all,
I have a problem that's been bugging me for awhile.
I have code in the Application_Startup() event that reads
an integer value from a file, and writes it into an
Integer variable.
I also have code in the Application_Quit() event that
writes the value of that same variable into the same file,
overwriting the value in the file.
And, I have code in the Application_NewMail() event that
increments the variable.
The problem is, it's not working. I have verified that the
code in each event is working properly.
But, every time I check the value of the variable after
restarting Outlook, it's zero, despite the fact that I
know there was a non-zero value in the variable before
shutdown. And reading the file in a text editor between
restarts of Outlook shows zero. If I put a value into the
file using a text editor, the variable is still zero upon
restarting Outlook.
My thought is that I'm missing something about where & how
to declare the integer variable. I tried Dim-ing it in the
General Declarations area with no luck.
Any input will be much appreciated!
Thanks,
-Andrew
I have a problem that's been bugging me for awhile.
I have code in the Application_Startup() event that reads
an integer value from a file, and writes it into an
Integer variable.
I also have code in the Application_Quit() event that
writes the value of that same variable into the same file,
overwriting the value in the file.
And, I have code in the Application_NewMail() event that
increments the variable.
The problem is, it's not working. I have verified that the
code in each event is working properly.
But, every time I check the value of the variable after
restarting Outlook, it's zero, despite the fact that I
know there was a non-zero value in the variable before
shutdown. And reading the file in a text editor between
restarts of Outlook shows zero. If I put a value into the
file using a text editor, the variable is still zero upon
restarting Outlook.
My thought is that I'm missing something about where & how
to declare the integer variable. I tried Dim-ing it in the
General Declarations area with no luck.
Any input will be much appreciated!
Thanks,
-Andrew