• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

macro not running on separate sheets within same workbook

KHum

New Member
Hi- was able to get

>>> use code - tags <<<
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

    ActiveSheet.AutoFilter.ApplyFilter

End Sub
to run on the first sheet but not the second. When I try to run the macro it keeps popping up this box- I've attached an image of the screen.

How do I make this work? I honestly only got it to work on the first sheet by accident and I'm not sure what I did.
 

Attachments

  • excel macro questions.png
    excel macro questions.png
    21.5 KB · Views: 3
KHum
As I tried to ask: Do You have that code in every sheet's code-page?
Your wrote: yes- or at least I think I do
Did You check it like below?
Screenshot 2022-05-12 at 23.35.58.png

or did You see as below?
Screenshot 2022-05-12 at 23.37.15.png
 
I made sure both windows looked like you showed me and closed out of excel entirely- not closing the file and now it works. Thank you very much for your patience!
 
Back
Top