louiserace
New Member
- Joined
- Jun 24, 2015
- Messages
- 15
I have a couple of macros that have been running weekly for over 2 years. However, the first time they have been run this year the EVALUATE line crashes in the following piece of code:
with the error:
I have tried old versions of the spreadsheets that ran perfectly last year and they crash as well.
What can have changed?
By the way, I know that the method I used is not the best way, but I had not been coding long and I would definitely do it another way now but I would still like to know why it has suddenly stopped working.
VBA Code:
Dim deleteStudent As Boolean
deleteStudent = Evaluate("IsError('Student Data'!1:1)")
If deleteStudent = False Then
Application.DisplayAlerts = False
Worksheets("Student Data").Delete
Application.DisplayAlerts = True
End If
Run-time error '13':
Type mismatch
I have tried old versions of the spreadsheets that ran perfectly last year and they crash as well.
What can have changed?
By the way, I know that the method I used is not the best way, but I had not been coding long and I would definitely do it another way now but I would still like to know why it has suddenly stopped working.