I have a workbook containing a sheet for each letter of the alphabet. Each row relates to an item distributed. I have the
distribution date in column A. In column B I have the 'Today' function. Column C is days lapsed using e.g. C2=B2-A2,
formatted to a single number. I have a 27th page called 'Alarm, in which all the data from Column C of all pages is fed. Each
cell is coded using the code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If [A2] >7 Then MsgBox "A2" , vbOKOnly + vbInformation, "Lapse Warning"
If [A3] >7 Then MsgBox "A3" , vbOKOnly + vbInformation, "Lapse Warning"
If [A4] >7 Then MsgBox "A4" , vbOKOnly + vbInformation, "Lapse Warning"
If [A5] >7 Then MsgBox "A5" , vbOKOnly + vbInformation, "Lapse Warning"
And so on, from A2 to A200 all the way to Z2 to Z200. Thus by selecting the alarm page, I can see which items have gone over
The trouble is;
a) This is a massive load of spaghetti code
b) It is too much data for the 64k limit for the VB editor in Excel 2003.
In the worse case scenario, I do want all those message boxes, as once the time has lapsed, I would chase it up and change
the date sent to the date chased (thanks for the prompt, TMShucks).
If anyone can give me any pointers as to how to chop this code down to size, I would be really grateful.