2007 wont run 2003 worksheet change event

Aussie Grid

New Member
Joined
Jan 14, 2010
Messages
47
I have extensive code on the worksheet change event involving data validation. I've changed macro settings and saved the book as a macro enabled 07 format. The log in form works OK but the change event will only run for the first sheet change. Open and close and again the change event only runs once.
Ideas?
Any & all help appreciated
Aussie Grid
 

Some videos you may like

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
Are you by any chance toggling Events in your code and do you have Error Handlers in place ?

Might be an idea to post the ChangeEvent code in the first instance.
 

Aussie Grid

New Member
Joined
Jan 14, 2010
Messages
47
Thank you DonkeyOte for your help. I did have an error handler in place which exited sub on error. This was fine with 03 but 07 obviously didn't like it. Removed it and have had no more trouble.
TKU
Aussie Grid
 

DonkeyOte

MrExcel MVP
Joined
Sep 6, 2002
Messages
9,123
The Exit Sub would only be an issue if you had Disabled Events beforehand and were not reinstating them prior to Exit...

One way of handling in this manner is to use an Exit Point

Code:
Sub Marine()
Dim dblX As Double
On Error GoTo ExitPoint
Application.EnableEvents = False
dblX = 1 / Round(Rand(),0)
MsgBox "No Error!"
ExitPoint:
Application.EnableEvents = True
End Sub

this way, regardless of whether routine throws an error or not the Events are always reinstated... obviously this is a simplified example but...

Regards error handling practices: http://www.cpearson.com/excel/ErrorHandling.htm
 

Watch MrExcel Video

Forum statistics

Threads
1,118,877
Messages
5,574,767
Members
412,617
Latest member
mlharris
Top