Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
RaY RaY is offline
external usenet poster
 
Posts: 164
Default Filtering worksheet in VBA

Thank you Dave, it works prefectly.

"Dave Peterson" wrote:

Check the name of the worksheet that owns the change:

Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

Select Case LCase(Sh.Name)
Case Is = "sheet1", "sheet2", "sheet3"
'do something
Case Is = "sheet5", "sheet4", "sheet6"
'do something else
Case Else
'do nothing or something else completely
End Select
End Sub




RaY wrote:

Hi,
I have got this situation. I made a macro that will be auto run after a
column has been updated. I am using Workbook_SheetChange in ThisWorkbook.
Since I need to update 12 sheets with that macro so that I put it in
there. The problem is.... the marco will be run in the other unnecessary
worksheet too.
Is there a method or way to return a value of the current worksheet and
let the code determine not to run that marco when that sheet is selected?

Regards,

Ray


--

Dave Peterson

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
Worksheet Filtering by UserName KA Excel Worksheet Functions 2 December 1st 09 08:14 PM
filtering a worksheet to print p-nut Excel Discussion (Misc queries) 2 March 22nd 07 11:18 AM
multiple worksheet filtering HHoward Excel Discussion (Misc queries) 1 February 9th 07 02:39 PM
HELP!!! Advanced Filtering to another Worksheet Sondra Excel Programming 4 January 27th 06 02:34 AM
filtering out data using other worksheet Jaypee Excel Programming 1 September 29th 05 08:43 AM


All times are GMT +1. The time now is 07:19 PM.

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

About Us

"It's about Microsoft Excel"