PDA

View Full Version : On change event issues



lambi15
12-13-2013, 04:04 AM
I am a basic user of VBA and have built up with the help of forums a detailed holiday tracker for work.

In part of the workbook I have 52 worksheets with each one showing the working days and the names of the colleagues (weekly overview).

Each colleague also has a holiday card worksheet with all 52 weeks of the year on. When a colleague asks for a week off I put a 1 in each of the days on their holiday card worksheet. This automatically transfers to the weekly overview.

This all works pretty well, however we also have 4 first aiders in the company. I want to have a userform pop up if all 4 colleagues are put in for holiday on the same day.

The userform will activate and show on the active worksheet which would be one of the colleagues holiday card.

I have tried different on change events but nothing seems to work.

It will not let me attach the workbook for anyone to look at.

Any help would be much appreciated.

Bob Phillips
12-13-2013, 08:41 AM
I wouldn't design my workbook like that, 1 sheet per week, but as it stands I would add a workbook_sheetchange event that fires when a holiday is added and checks if one of the first aiders is the person in question, then checks if any of the other 3 have that day off, if so, flag it.