Hi
Can't seem to get the row counting thing to work with ActiveSheet.
This is what I have:
to summarize, I have a workbook that generates a new sheet after the last one, names it then adds filtered data. On a different sheet I have all the workings out to produce a graph, fairly standard stuff I think. But I can't seem to use the new sheet, I have set a global variable (CurrentWS) as a worksheet so that it can be used in the whole module, and that seems fine elsewhere. But in this one line to simply count all the rows in that sheet, I get a runtime error 13, type mismatch.
So I have substituted CurrentWS for active sheet sheet and that doesn't work either. The code above is confusing me, the first line assigning variable Last, uses the data dump sheet that I have named in the sheet properties as Data, and this works fine, then second line using active sheet, when I have the latest sheet active with enough data on it to produce a result fails. Can any one spot my error please?
Kind regards
Rob
Bookmarks