Invoke VBA - Wont recognize required sheet

Hi,

While trying to run a VB Script on my Excel spreadsheet i keep getting errors as it doesnt seem to want to pick up the spreadsheet that i need.
3086 REPORT.xlsx (342.1 KB)
Any suggestions to why this isnt working?

Please see script below
Sub Filter1()

’ Filter1 Macro

Sheets("Z9MM103").Select

ActiveSheet.Range("$A$1:$WWI$749").AutoFilter Field:=12, Criteria1:="5901"
ActiveSheet.Range("$A$1:$WWI$749").AutoFilter Field:=8, Criteria1:="TrRes"
Rows("3:748").Select
Selection.Delete Shift:=xlUp
ActiveSheet.Range("$A$1:$WWI$736").AutoFilter Field:=8
ActiveSheet.Range("$A$1:$WWI$736").AutoFilter Field:=12

End Sub

Regards,
Shawn

How you are invoking the code @shawnmurray ?

@HareeshMR Using InvokeVBA Activity

Thanks

Can you post the entire code you are using?

:slight_smile: @shawnmurray

1 Like

@HareeshMR Is this what you are looking for?

Main.xaml (4.7 KB)

Filter1.txt is the file with the VBA which i posted previously.

Thanks

ITS WORKING FINE !!!

@ImPratham45
Please see my errors below!!
Error

Thanks

TestFor.zip (336.4 KB)

@ImPratham45
Thats so strange!!

Did you change anything or do anything different?

Regards,
Shawn

Just remove this :blush:

Thanks !
mark it as solution if u got!

2 Likes

Perfect!

Thank you very much!!

Regards,
Shawn

Your most welcome !!!

Regards,
Prathamesh

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.