erik.smans
New Member
- Joined
- Apr 23, 2007
- Messages
- 4
I'm currently facing a big problem and I was hoping you can help me.
I created a workbook containing the following code:
The code is stored in a workbook module, and the function is used in the sheets and in other procedures.
Problem:
When the sheet is openend for the first time, it gives an 'automation error' (440).
To solve this I do the following:
1. Open with macro's disabled
2. Remove the 'Leeg' function
3. Store the workbook and reopen with the macro's enabled
4. Put the function back and press F9 to recalculate
5. Store the workbook
From then on the error is gone. Unfortunately this file is used daily and send by e-mail many times per week with different names. It makes the file very user-unfriendly, specially because it has a protection code.
I created a workbook containing the following code:
Code:
Function Leeg(x) As Boolean
If IsNull(x) Then Leeg = True Else Leeg = Trim(x) = ""
End Function
The code is stored in a workbook module, and the function is used in the sheets and in other procedures.
Problem:
When the sheet is openend for the first time, it gives an 'automation error' (440).
To solve this I do the following:
1. Open with macro's disabled
2. Remove the 'Leeg' function
3. Store the workbook and reopen with the macro's enabled
4. Put the function back and press F9 to recalculate
5. Store the workbook
From then on the error is gone. Unfortunately this file is used daily and send by e-mail many times per week with different names. It makes the file very user-unfriendly, specially because it has a protection code.