Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to change the pivot chart automaticaly as values in the worksheet change | Excel Worksheet Functions | |||
VBA Worksheet change name | Excel Discussion (Misc queries) | |||
change formula in a shared worksheet without losing change history | Excel Worksheet Functions | |||
Help Please, Worksheet Change | Excel Worksheet Functions | |||
Worksheet change | Excel Programming |