Hi Dec the battery has not been disconnected ,i had all the windows down and sunroof and and held the button on the fob facing the driver door handle to shut every thing but nothing happened..so i am wondering does the key fob need reprogramming..
If you look through the view finder of a digital camera can you see a Blue/White light flashing when you press the button?
The Red lens will illuminate and then you will see, or should see, the Blue/White light flashing when you press and hold down the button, can only be seen through a digital/phone camera.
I wonder if the close all function is related to the alarm; do you have a working alarm?
My old w202 of 1995 would close the windows if the were open when locking, this was part of the alarm system.
What were you doing immediately before the fault appeared, were you doing any work on the car?
the link you sent me on how to check the infra light on the key fob,it says to look through a camera lens which i did and the white flashing light in the fob is working.As i was at the car show i had the windows and sunroof open,i was showing another person with w124 that i could lock all the windows and sunroof by holding down the button the fob to close everything on the car..but nothing happened.
so i assumed the key needs to be reprogrammed.