Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet change

hi iam developing a report that uses the Private worksheet change
function. the code below i my test code this works but is there a way
that i can disable this the code whilst the report is created (as it
fires all the time as the report is run) and then reinitialise it
after the report is completed.

Sub Worksheet_Change(ByVal target As Range)
MsgBox "Hi"
End Sub

my aim is that the user can select a cell and change thew value then
the worksheet change function will work out if it is above or below
15% of anouther value and then apply the relevent formatting. this bit
i got sorted but need the worksheet change to be disabled up until the
report is built for the user. (user requests report so it is built
loads of times also data changes often)

please any help would be most appriciated

Andy
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Worksheet change

"Chip Pearson" wrote in message ...
Andrew,

You can disable events with code such as the following:

Application.EnableEvents = False
'
' your code here
'
Application.EnableEvents = True


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
www.cpearson.com



"Andrew Haycock" wrote in message
om...
hi iam developing a report that uses the Private worksheet change
function. the code below i my test code this works but is there a way
that i can disable this the code whilst the report is created (as it
fires all the time as the report is run) and then reinitialise it
after the report is completed.

Sub Worksheet_Change(ByVal target As Range)
MsgBox "Hi"
End Sub

my aim is that the user can select a cell and change thew value then
the worksheet change function will work out if it is above or below
15% of anouther value and then apply the relevent formatting. this bit
i got sorted but need the worksheet change to be disabled up until the
report is built for the user. (user requests report so it is built
loads of times also data changes often)

please any help would be most appriciated

Andy


I've tried that but that doesn't solve the problem when the report is
built. i need a way to have the code their but not fired when the
report is built (built using sql to get data from database) then when
it's all done and teh user can see the report teh code is active and
will then and do the stuff i want

eg

user requests report - report built but worksheet_change not fired
till report built - report finished user can see it and start
manipulating the report - worksheet_change fired when user cahnges a
cell value specific cell

Help!!!

Andy
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
how to change the pivot chart automaticaly as values in the worksheet change Vinay Vasu Excel Worksheet Functions 0 May 3rd 10 04:25 PM
VBA Worksheet change name James C[_2_] Excel Discussion (Misc queries) 2 January 26th 10 05:34 PM
change formula in a shared worksheet without losing change history DCE Excel Worksheet Functions 5 July 25th 08 01:37 PM
Help Please, Worksheet Change ilvmgicker Excel Worksheet Functions 1 June 14th 06 09:41 AM
Worksheet change Andy Brown Excel Programming 3 September 5th 03 02:40 PM


All times are GMT +1. The time now is 12:21 AM.

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"