ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reuel Other Help (https://www.excelbanter.com/excel-programming/368658-reuel-other-help.html)

solomon_monkey[_2_]

Reuel Other Help
 
Thanks to Reuel for your reply to an old post of mine. It had mostly
cleared up on a newer computer but has now raised its head again... I
can only imagine because of the scheer number of lines in the
spreadsheet (processing 360 lines now)... the piece of code that
sometimes goes wrong is...

Sheets("MonthlyReceipts").Copy After:=Sheets(2) 'because I don't want
to redo the changes I am making with the macro
ActiveSheet.Unprotect
'because it is protected

ActiveSheet.Columns("E:E").Delete 'just because

'Deletes all 'blank'
ActiveSheet.Range("A9:E9").AutoFilter Field:=5, Criteria1:="="
'this does filter column E to only show blanks but then causes the
error

ActiveSheet.AutoFilter.Range.Select
'this would delete the blank rows and the first row of the
Filter
Range(Selection, Selection.End(xlDown)).Select
Selection.EntireRow.Delete

Most of the time it is fine but now it is Filtering over 300 rows it
errors everytime.

Any help...


solomon_monkey[_2_]

Reuel Other Help
 

Oddly... dealing in the same way with the only difference in the code
being the omission of

ActiveSheet.Columns("E:E").Delete

the code works fine... however, there are less blanks in this one...
Maybe I could just copy and paste Column F to E...


solomon_monkey[_2_]

Reuel Other Help
 

Well goodness just a simple copy and paste DOES work!!

Thanks anyway y'all.



All times are GMT +1. The time now is 06:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com