I have had these lines of code in a program for two years.
It has worked without any issues, in fact this very section of the code ran yesterday. No code changes were made and Excel nor Windows were upgraded.
Today it failed.
First with no error message at all, Excel crashed.
I ran it again and it failed and indicated an Automation Error.
I replaced the line of code with
It worked no issues. There is a section of code following this with a similar structure.
The program has 17 tables and 12,000 lines of code.
Are there limits in Excel?
Any thoughts would be appreciated.
Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Sheets("ShiftReport").Select
Range("B2").Select
ActiveCell.FormulaR1C1 = CDate(frmShiftOnDuty.dtpShiftDate.value)
[/FONT]
It has worked without any issues, in fact this very section of the code ran yesterday. No code changes were made and Excel nor Windows were upgraded.
Today it failed.
First with no error message at all, Excel crashed.
I ran it again and it failed and indicated an Automation Error.
I replaced the line of code with
Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]Worksheets("ShiftReport").Range("B2") = CDate(frmShiftOnDuty.dtpShiftDate.value)
[/FONT]
It worked no issues. There is a section of code following this with a similar structure.
I did not make any changes to this section and it worked
Code:
[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif] Range("B3").Select
ActiveCell.FormulaR1C1 = frmShiftOnDuty.cboShift
[/FONT]
The program has 17 tables and 12,000 lines of code.
Are there limits in Excel?
Any thoughts would be appreciated.