Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default "On open€¯ interferes with "On Change"

I have a work book with 15 Worksheets. This is accesses by numerous
individuals. Each sheet has "On Change" code that notes the last day and time
the any data was changed in the worksheet. I would also like to add a
function that tells me when the last time the worksheet was accessed or
opened. However when I used the on open procedure to capture this data it
also changed the "On Change" date. I want these two dates to be independent
of each other.
--
Thank You
RVF
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default "On open€¯ interferes with "On Change"

If in your on open code you make a change then it will fire your on change
event code. You can supress events with code like this.
application.enableevents = false
'make your change
application.enableevents = true

Just make darn sure taht you always reset that setting as it is a presistent
setting that is not reset by restarting XL. If you turn events off the only
way to get them back on again is via code... To that end I never use that
code without an error handler.
--
HTH...

Jim Thomlinson


"Richard" wrote:

I have a work book with 15 Worksheets. This is accesses by numerous
individuals. Each sheet has "On Change" code that notes the last day and time
the any data was changed in the worksheet. I would also like to add a
function that tells me when the last time the worksheet was accessed or
opened. However when I used the on open procedure to capture this data it
also changed the "On Change" date. I want these two dates to be independent
of each other.
--
Thank You
RVF

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default "On open" interferes with "On Change"

Actually, restarting Excel does reset Application.EnableEvents to True. I
just tested it to be sure.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jim Thomlinson" wrote in message
...
If in your on open code you make a change then it will fire your on change
event code. You can supress events with code like this.
application.enableevents = false
'make your change
application.enableevents = true

Just make darn sure taht you always reset that setting as it is a
presistent
setting that is not reset by restarting XL. If you turn events off the
only
way to get them back on again is via code... To that end I never use that
code without an error handler.
--
HTH...

Jim Thomlinson


"Richard" wrote:

I have a work book with 15 Worksheets. This is accesses by numerous
individuals. Each sheet has "On Change" code that notes the last day and
time
the any data was changed in the worksheet. I would also like to add a
function that tells me when the last time the worksheet was accessed or
opened. However when I used the on open procedure to capture this data it
also changed the "On Change" date. I want these two dates to be
independent
of each other.
--
Thank You
RVF



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default "On open" interferes with "On Change"

Mine doesn't... Either it is an install setting or perhaps something else.
--
HTH...

Jim Thomlinson


"Jon Peltier" wrote:

Actually, restarting Excel does reset Application.EnableEvents to True. I
just tested it to be sure.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jim Thomlinson" wrote in message
...
If in your on open code you make a change then it will fire your on change
event code. You can supress events with code like this.
application.enableevents = false
'make your change
application.enableevents = true

Just make darn sure taht you always reset that setting as it is a
presistent
setting that is not reset by restarting XL. If you turn events off the
only
way to get them back on again is via code... To that end I never use that
code without an error handler.
--
HTH...

Jim Thomlinson


"Richard" wrote:

I have a work book with 15 Worksheets. This is accesses by numerous
individuals. Each sheet has "On Change" code that notes the last day and
time
the any data was changed in the worksheet. I would also like to add a
function that tells me when the last time the worksheet was accessed or
opened. However when I used the on open procedure to capture this data it
also changed the "On Change" date. I want these two dates to be
independent
of each other.
--
Thank You
RVF




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default "On open" interferes with "On Change"

I don't know of any particular installation setting that would change this.
(Doesn't mean there isn't one.) It might be version specific (I'm using 2003
SP2 or 3).

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______



"Jim Thomlinson" wrote in message
...
Mine doesn't... Either it is an install setting or perhaps something else.
--
HTH...

Jim Thomlinson


"Jon Peltier" wrote:

Actually, restarting Excel does reset Application.EnableEvents to True. I
just tested it to be sure.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Jim Thomlinson" wrote in
message
...
If in your on open code you make a change then it will fire your on
change
event code. You can supress events with code like this.
application.enableevents = false
'make your change
application.enableevents = true

Just make darn sure taht you always reset that setting as it is a
presistent
setting that is not reset by restarting XL. If you turn events off the
only
way to get them back on again is via code... To that end I never use
that
code without an error handler.
--
HTH...

Jim Thomlinson


"Richard" wrote:

I have a work book with 15 Worksheets. This is accesses by numerous
individuals. Each sheet has "On Change" code that notes the last day
and
time
the any data was changed in the worksheet. I would also like to add a
function that tells me when the last time the worksheet was accessed
or
opened. However when I used the on open procedure to capture this data
it
also changed the "On Change" date. I want these two dates to be
independent
of each other.
--
Thank You
RVF






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
How do I change the column heading in Excel to display "A" "B" "C Thai New Users to Excel 1 November 30th 07 08:06 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
=IF(D13="PAID","YES","NO") Can I change fonts colour Kev Excel Discussion (Misc queries) 3 February 17th 06 04:27 AM


All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"