I'm baffled by what is happening with this error. In reading a lot of posts on-line the normal issue is a failure to fully define a Range. In my case I believe I have defined everything and the attached logic works perfectly during the time I am within the spreadsheet. The problem develops when I go to close the workbook. Most typically I get the error just after clicking on "Don't Save" in the message box. The call stack shows this routine is being called due to one of a variety of combo boxes recording a change. That activation is as expected for when I'm actually selecting something in the combo box and the process is intended to clear some working space of old data. What I don't understand is why the combobox change routine is activating when exiting the workbook.
An interesting quirk of this is that if I set a break on the first line in this routine, it will break at that point during the exit process. I can then click Resume and it will execute properly without creating the error message and ultimately close the program. There does seem to be a lot of calculations going on during that exit process which doesn't make a whole lot of sense to me.
Sub InitializeCCZoneArea()
'Initialize options storage area to zero to avoid out of date entries
Dim row As Integer
Dim col As Integer
Worksheets("CC Wind").Range(Cells(123, 2), Cells(128, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(131, 3), Cells(136, 40)).Value = ""
' Worksheets("CC Wind").Range(Cells(139, 2), Cells(144, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(147, 2), Cells(152, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(157, 3), Cells(162, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(165, 3), Cells(170, 40)).Value = ""
' Worksheets("CC Wind").Range(Cells(173, 2), Cells(178, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(181, 3), Cells(186, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(191, 3), Cells(192, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(195, 3), Cells(196, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(200, 3), Cells(201, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(204, 3), Cells(205, 40)).Value = ""
End Sub
Any help or suggestions would be appreciated. I've run out of ideas.
thanks.
An interesting quirk of this is that if I set a break on the first line in this routine, it will break at that point during the exit process. I can then click Resume and it will execute properly without creating the error message and ultimately close the program. There does seem to be a lot of calculations going on during that exit process which doesn't make a whole lot of sense to me.
Sub InitializeCCZoneArea()
'Initialize options storage area to zero to avoid out of date entries
Dim row As Integer
Dim col As Integer
Worksheets("CC Wind").Range(Cells(123, 2), Cells(128, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(131, 3), Cells(136, 40)).Value = ""
' Worksheets("CC Wind").Range(Cells(139, 2), Cells(144, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(147, 2), Cells(152, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(157, 3), Cells(162, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(165, 3), Cells(170, 40)).Value = ""
' Worksheets("CC Wind").Range(Cells(173, 2), Cells(178, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(181, 3), Cells(186, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(191, 3), Cells(192, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(195, 3), Cells(196, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(200, 3), Cells(201, 40)).Value = ""
Worksheets("CC Wind").Range(Cells(204, 3), Cells(205, 40)).Value = ""
End Sub
Any help or suggestions would be appreciated. I've run out of ideas.
thanks.