Rx_
Nothing In Moderation
- Local time
- Today, 08:03
- Joined
- Oct 22, 2009
- Messages
- 2,803
Wondering if a global search and replaces would be in order?
The problem is some random errors with the Excel application object.
Each of about 30 report functions begin with:
320 If ObjXL Is Nothing Then
330 Set ObjXL = New excel.Application
From this point, the ObjXL is used through out the code:
e.g. ObjXL.EnableEvents = False
ObjXL.Range("I5").Select
But past programmers have sprinkled code in the following format:
ObjXL.Application.CutCopyMode = False
ObjXL.Application.DisplayAlerts = False
ObjXL.Application.Calculation = xlAutomatic
While this appears to work the vast majority of the time, the home-made error logging shows that there are random failures related to the Application object.
Can anyone think of a reason that a global application search and replace of
ObjXL.Application replaced with ObjXL
could be a problem?
The problem is some random errors with the Excel application object.
Each of about 30 report functions begin with:
320 If ObjXL Is Nothing Then
330 Set ObjXL = New excel.Application
From this point, the ObjXL is used through out the code:
e.g. ObjXL.EnableEvents = False
ObjXL.Range("I5").Select
But past programmers have sprinkled code in the following format:
ObjXL.Application.CutCopyMode = False
ObjXL.Application.DisplayAlerts = False
ObjXL.Application.Calculation = xlAutomatic
While this appears to work the vast majority of the time, the home-made error logging shows that there are random failures related to the Application object.
Can anyone think of a reason that a global application search and replace of
ObjXL.Application replaced with ObjXL
could be a problem?