Is it possiible to target Appication.EnableEvents on one worksheet

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I have got few worksheets, is there way to only
Application.EnableEvents=False on one worksheet only?

Thanks
Augustus
 
This is an application wide setting. It applies to Excel not to a specific
sheet. You can use the on activate and deactivete events to toggle this
setting for the sheet....
 
You could always just igore any events coming from that sheet
(assuming it's your own code that's handling the events)

Tim
 
Thanks Tim & Jim.

I'm sorry for not making clear in the first place, I think I tried to
generalise too much, so I'm going to be more specify.

My situation is this:
Sheet A: Various option (3 main options)
Sheet B: Input data
Sheet C: Gather total value from Sheet B (via direct link)
Sheet D: Dumping area(Stored constant, like which options been selected on
sheet A)
My problem is that only one of the options on SheetA require me to monitor
some range on Sheet C. While the other two options doesn't require this event.

This way I would like to know is there way to target a specify sheet only. I
have tried with the following scenario:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
''''''''''Monitor A6
Dim VRange As Range

Set VRange = Me.Range(Me.Range("Quantities12").cells(1, 1),
Me.Range("Quantities15").cells(1, 1))

'''''this has been seperated to speed up code'''''
If Sheet9.Range("A6").Value <> bytJob Then
Exit Sub
End If
If Union(Target, VRange).Address <> VRange.Address Then
Exit Sub
End If

etc.....

My main concern is that at our company people have a tendency to open at
least 5 windows at one time, with the Worksheet_Change, this might used up
more computer resource then necessary.


So, does anyon have any suggestion?

Thanks
Augustus
 
Is there any possibility you could monitor the range using a custom
function instead of the worksheet change (with the result going to
SheetA)? I'm not sure what you're doing in the worksheet_change
event, so perhaps that's not useful.

I wouldn't worry about using up resources unless you're doing a lot of
complicated stuff in the event handler.

Tim.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top