Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variables
I have declared two Public variables to track various data. Eveything works
well until the systme crashes (in this case, which I will fix, because the suggesated sheetname has more than 31 characters). Once it crashes the Public variables loose their values and can't be reset; closing the workbook doesn't help but restarting Excel does. Is this a scope problem; can I fix it in code? Regards -- Les Gordon |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variables
Generally, you code should be designed not to crash, so this shouldn't be an
issue in a working app. Running the code that originally set the values for the variables should work again after the crash (if you hit the reset button in the VBE). -- Regards, Tom Ogilvy "Les Gordon" wrote in message ... I have declared two Public variables to track various data. Eveything works well until the systme crashes (in this case, which I will fix, because the suggesated sheetname has more than 31 characters). Once it crashes the Public variables loose their values and can't be reset; closing the workbook doesn't help but restarting Excel does. Is this a scope problem; can I fix it in code? Regards -- Les Gordon |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Public Variables
Thanks Tom
I agree competely, but it did; my fault in this case in that I didn't realize that sheet names had these restrictions; generally I have error trapping and this isn't a problem. However, the reset doesn't solve the dilemma in this case. The Public variables just refuse to take new values; the don't re-initilailize. I trace the values and they exist all the way through and then dissappear at the end of the function. I can't get them to stick until I restart Excel. It's a bit frustrating during a debugging phase. Regards Les "Tom Ogilvy" wrote: Generally, you code should be designed not to crash, so this shouldn't be an issue in a working app. Running the code that originally set the values for the variables should work again after the crash (if you hit the reset button in the VBE). -- Regards, Tom Ogilvy "Les Gordon" wrote in message ... I have declared two Public variables to track various data. Eveything works well until the systme crashes (in this case, which I will fix, because the suggesated sheetname has more than 31 characters). Once it crashes the Public variables loose their values and can't be reset; closing the workbook doesn't help but restarting Excel does. Is this a scope problem; can I fix it in code? Regards -- Les Gordon |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
public variables | Excel Discussion (Misc queries) | |||
Public variables | Excel Discussion (Misc queries) | |||
Public Variables | Excel Discussion (Misc queries) | |||
Declaring Variables Public | Excel Programming | |||
Public variables and Class | Excel Programming |