- May
- 13,594
- 201
I have a VBA script assigned to a certain Excel file's "save" event. After setting a few user environment variables, that script does this.
When I save that Excel file, I notice behavior that makes me very curious ... behavior that depends in TCC in a rather peculiar way.
If TCC is not running, or TCC is executing "DELAY 30" or TCC is executing "COPY ftp://..." the script terminates (hourglass disappears) in about 1 second.
If TCC is idling, the script terminates in about 3.5 seconds. (!)
If TCC is executing "COPY \\remote\...", the script doesn't terminate and Excel goes into a "not responding" state (can be 20-30 seconds) until the COPY is finished. (!!)
So I wonder ... Why isn't TCC idling among the best of the scenarios? And why is the last one above so bad?
I save that Excel file every day and I've tested the scenarios above (and a few others) many times.
Code:
Call SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, _
"Environment", SMTO_ABORTIFHUNG, 5000, dwResult)
When I save that Excel file, I notice behavior that makes me very curious ... behavior that depends in TCC in a rather peculiar way.
If TCC is not running, or TCC is executing "DELAY 30" or TCC is executing "COPY ftp://..." the script terminates (hourglass disappears) in about 1 second.
If TCC is idling, the script terminates in about 3.5 seconds. (!)
If TCC is executing "COPY \\remote\...", the script doesn't terminate and Excel goes into a "not responding" state (can be 20-30 seconds) until the COPY is finished. (!!)
So I wonder ... Why isn't TCC idling among the best of the scenarios? And why is the last one above so bad?
I save that Excel file every day and I've tested the scenarios above (and a few others) many times.