Trying to Record Macro and getting the pop-up "Too many line continuations"

PaigeWarner

New Member
Joined
May 27, 2020
Messages
48
Office Version
  1. 365
Platform
  1. MacOS
Hello,

I am trying to do a Record Macro and filter out and Delete all lines that start with 51 in column D Purchasing Document. When I have my filter on and put 51* in the search field in column D, I get this pop-up message which then also stops the recording:

1616010705901.png



Here is what the code looks like in Visual Basic after auto stopping:
__________________________________________________________________________________
Sub PO_51_DELETE()
'
' PO_51_DELETE Macro
'

'
Rows("1:1").Select
Selection.AutoFilter
ActiveSheet.Range("$A$1:$D$1329").AutoFilter Field := 4, Criteria1 := Array( _
"5100058294","5100217898","5105518931","5106444516","5106457849","5107405499", _
"5107583231","5107839718","5107897397","5107897399","5107934878","5107956289", _
"5108006056","5108010504","5108024465","5108048923","5108057848","5108057859", _
"5108057894","5108057895","5108057896","5108059075","5108065997","5108065998", _
"5108073276","5108073277","5108073278","5108073279","5108073280","5108073281", _
"5108073282","5108073283","5108073917","5108073918","5108073921","5108073940", _
"5108073941","5108073942","5108073958","5108073959","5108073960","5108073961", _
"5108073962","5108073963","5108073964","5108073965","5108073975","5108079163", _
"5108079165","5108079194","5108079198","5108079199","5108083441","5108083487", _
"5108083488","5108083489","5108083490","5108083491","5108092894","5108097166", _
"5108101387","5108101388","5108101389","5108101390","5108101391","5108101392", _
"5108101393","5108101417","5108102937","5108102942","5108102981","5108102986", _
"5108102987","5108102988","5108102989","5108102993","5108105785","5108106489", _
"5108107777","5108108399","5108109289","5108113645","5108113654","5108113666", _
"5108113668","5108113669","5108113670","5108118560","5108118571","5108119561", _
"5108119580","5108119581","5108119586","5108119587","5108119588","5108119589", _
"5108119592","5108119597","5108120128","5108120138","5108122281","5108122282", _
"5108122685","5108122698","5108123888","5108124882","5108124892","5108124897", _
"5108126034","5108126071","5108127455","5108127981","5108128562","5108129362", _
"5108129399","5108130076","5108130077","5108130600","5108132341","5108132362", _
"5108132363","5108132998","5108135389","5108135446","5108135450","5108136047", _
"5108136049","5108136052","5108136073","5108136086","5108136812","5108139197", _
"5108139198","5108139629","5108140964","5108141035","5108141036","5108141053", _
End Sub
__________________________________________________________________________________



Here is a copy and paste of the columns in the sheet for reference:
IDoc numberPartner numberVendor NamePO Number
79988937511121GHI Incorporated4700491539
79988937111121GHI Incorporated4700583480
79988857211121GHI Incorporated4700651978
79988937711121GHI Incorporated4703011097
79992539531415JKL Incorporated4703319968
79992275831415JKL Incorporated4703481592
79967931531415JKL Incorporated4703539860
79975258931415JKL Incorporated4703539861
79992539931415JKL Incorporated4703612696
79964883216171MNO Incorporated4703619064
79964883216171MNO Incorporated4703619065
79964883216171MNO Incorporated4703619066
79964883216171MNO Incorporated4703619068
79964883216171MNO Incorporated4703619069
80001892867891DEF Incorporated4703619070
80001892867891DEF Incorporated4703619071
79964883216171MNO Incorporated4703619073
79964883216171MNO Incorporated4703619075
79964883216171MNO Incorporated4703619078
80001892867891DEF Incorporated4703619079
80001892867891DEF Incorporated4703619080
79964883216171MNO Incorporated4703619086
79964883216171MNO Incorporated4703619087
79964883216171MNO Incorporated4703619089
80001892867891DEF Incorporated4703619090
80001892867891DEF Incorporated4703619094
79964883216171MNO Incorporated4703619096
79964883216171MNO Incorporated4703637552
79964883216171MNO Incorporated4703699082
80001892867891DEF Incorporated4703699152
80001892867891DEF Incorporated4703699153
79964883216171MNO Incorporated4703729793
79964883216171MNO Incorporated4703761017
79964883216171MNO Incorporated4703771594
80001892867891DEF Incorporated4703827161
80001892867891DEF Incorporated4703830356
79988937511121GHI Incorporated4703843760
79988937111121GHI Incorporated4703857279
79988857211121GHI Incorporated4703857280
79988937711121GHI Incorporated4703869272
79992539531415JKL Incorporated4703869273
79992275831415JKL Incorporated4703875852
79967931531415JKL Incorporated4703877151
79975258931415JKL Incorporated4703883842
 

Attachments

  • 1616008907771.png
    1616008907771.png
    26.2 KB · Views: 11
Yes I know. As I stated before, I don't know how to code for also deleting those rows. Unfortunately, when doing the record Macro it stopped recording at the the pop-up message.
 
Upvote 0

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Ok how about
VBA Code:
With ActiveSheet
   .Range("A1:D1").AutoFilter 4, "51*"
   .AutoFilter.Range.Offset(1).EntireRow.Delete
End With
 
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,213
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top