Prev: Marco to protect / unprotect worksheet
Next: ActiveWorkbook.SaveAs Function - Can I specify the user account to save the file with
From: Chip Pearson on 26 Jan 2010 11:49 For the nth time, I will repeat that the Worksheet_Change event procedure must NOT (!!!!!!!) be in the ThisWorkbook code module. If it is, it will not be recognized by VBA and will not run when a cell value is changed. The Worksheet_Change event MUST (!!!!!!) go in the sheet module of the worksheet whose changes are to trapped. In Excel, right-click on the tab of the sheet whose changes you want to trap, and choose "View Code". Put your that code module. Again, do NOT (!) put the Worksheet_Change event code in the ThisWorkbook module. Maybe you don't understand what events are. See http://www.cpearson.com/excel/Events.aspx for much more detail about events, how they work, and how to code them. Finally, again, do NOT put the Worksheet_Change event in the ThisWorkbook module. This will NOT work. Cordially, Chip Pearson Microsoft MVP 1998 - 2010 Pearson Software Consulting, LLC www.cpearson.com [email on web site] On Sun, 24 Jan 2010 17:59:01 -0800, Philosophaie <Philosophaie(a)discussions.microsoft.com> wrote: >You have all my code. Why can't I figure out why the Worksheet_Change is not >firing when a cell in the range is manipulated? I do save and exit the >workbook before I run the updated program and I am using a xls file in Excel >2007.
From: Don Guillett on 26 Jan 2010 14:39
Chip Remember the Paul Newman movie "Cool hand Luke" and the guard said to Luke, "What we have here is a failure to cummunikate (sp) -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett(a)gmail.com "Chip Pearson" <chip(a)cpearson.com> wrote in message news:5u6ul512jvjvucp2pe924bulrfdduecuf5(a)4ax.com... > For the nth time, I will repeat that the Worksheet_Change event > procedure must NOT (!!!!!!!) be in the ThisWorkbook code module. If it > is, it will not be recognized by VBA and will not run when a cell > value is changed. The Worksheet_Change event MUST (!!!!!!) go in the > sheet module of the worksheet whose changes are to trapped. In Excel, > right-click on the tab of the sheet whose changes you want to trap, > and choose "View Code". Put your that code module. Again, do NOT (!) > put the Worksheet_Change event code in the ThisWorkbook module. > > Maybe you don't understand what events are. See > http://www.cpearson.com/excel/Events.aspx for much more detail about > events, how they work, and how to code them. > > Finally, again, do NOT put the Worksheet_Change event in the > ThisWorkbook module. This will NOT work. > > Cordially, > Chip Pearson > Microsoft MVP 1998 - 2010 > Pearson Software Consulting, LLC > www.cpearson.com > [email on web site] > > > > On Sun, 24 Jan 2010 17:59:01 -0800, Philosophaie > <Philosophaie(a)discussions.microsoft.com> wrote: > >>You have all my code. Why can't I figure out why the Worksheet_Change is >>not >>firing when a cell in the range is manipulated? I do save and exit the >>workbook before I run the updated program and I am using a xls file in >>Excel >>2007. |