Error 1004

mr_baz

New Member
Joined
Oct 26, 2010
Messages
20
Hi there,

I can't figure out what's wrong with my code for my macro.

Sheets("NON OFFICIAL NON BPPL LIST").Select
ActiveSheet.Range("A29:H29").Select
Selection.AutoFill Destination:=Range("A29:H2050")
ActiveSheet.Range("A29:H2050").Select
Calculate
Columns("A:I").Select
Selection.Copy
Sheets("OFFICIAL NON BPPL LIST").Select
ActiveWindow.SmallScroll Down:=-4
ActiveWindow.LargeScroll Down:=-1
Selection.AutoFilter Field:=1, Criteria1:="<>"
Application.CutCopyMode = False
ActiveSheet.ShowAllData
Sheets("NON OFFICIAL NON BPPL LIST").Select
Selection.Copy
Sheets("OFFICIAL NON BPPL LIST").Select
ActiveSheet.Columns("A:I").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Selection.AutoFilter Field:=1, Criteria1:="<>"


The sentence Selection.AutoFill Destination:=Range("A29:H2050") is highlighted.

Can someone help me?

Regards
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
worksheet is not protected. Cells A29 to H29 contains formulas that need to be copied until row 2050.
 
Upvote 0
What's in the cells you want to copy and the cells you want to autofill?
 
Upvote 0
Different formulas in each colomn....formulas are all working properly.

here's an example

=IF(AND(StandardHardwareRequests!$Q5="4. NON BPPL",StandardHardwareRequests!$U5="4. NON BPPL"),StandardHardwareRequests!$F5,"")

many thanks to your help!
 
Upvote 0
just try something...

I went to excel, I choose option, calculation and I put back automatic instead of manual and now it's working!

I put manual because there's a lot of calculation in this file and takes a while to calculate each time a data was entered.

Do you know why it wasn't working?

many thanks again!
 
Upvote 0

Forum statistics

Threads
1,224,599
Messages
6,179,831
Members
452,947
Latest member
Gerry_F

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