Hi all
I have written a macro for which the code is shown below.
Using excel 2007 but stored as .xls because an assistant user is gonig to use the workbook with excel2003.
The assistant user is experiencing an error titled "Object doesn't support this property or method". I only have a screenshot of this error message. Unfortunately, the assistant sits in a different geographical location so I'm unable to observe the error or replicate it on my side.
Compatibility checker in my excel shows taht there are NO ISSUES.
The macro runs perfectly on my computer.
Macro does the following (1) opens a .csv file, (2) copies all the content from the sheet, (3) switches back to my workbook, (4) inserts a new sheet, (5) pastes the data, (6) selects range (7) runs autofilter on 2 criteria (8) copies the filtered results (9) adds new sheet and pastes the copied data from (8).
From the screenshot that was supplied to me, I can see that the code is executing up to this line, and then the error msg is displayed:
'LastRow definition for imported bank statement
LastRow = Sheets("Import").Cells(Rows.Count, "A").End(xlUp).Row
This is where the error msgbox pops up.
The screenshot shows all cells highlighted. If I run the code up to cursor at the end of this line, then on my screen the Excel spreadsheet looks the same as the screenshot.
The next line of code goes on to the Autofilter.
Columns("A:I").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$I$" & LastRow).AutoFilter Field:=3, Criteria1:="="
ActiveSheet.Range("$A$1:$I$" & LastRow).AutoFilter Field:=2, Criteria1:="<>"
The screenshot does not show Columns A-I being selected.
So I'm guessing that this Autofilter type is not supported in Excel 2003? But I can't seem to find any more info on internet search.
Have checked Microsoft website here as advised by MarvinP.
Also used Bing search but with no success.
Here is the entire code -
Any suggestions?![]()
Please Login or Register to view this content.
Bookmarks