I have forgotten what I did to make this work!

QualityControlQC

New Member
Joined
Sep 2, 2019
Messages
3
I have a macro to pull a row of information from a worksheet upon clicking an icon and posting on the sheet with the Icon. Its been a long time since I used this macro and I have forgotten how I made it work. Can someone tell me what is wrong with this macro? It gives me a runtime error of 1004. I am just looking for a quick fix and not to rebuild the whole thing. Thanks for your help.

Range("WeldLog!Print_Area").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Range("NDE_REQUEST!Criteria"), CopyToRange:=Range("A10:AT10"), Unique:=False
 

Some videos you may like

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,575
Office Version
  1. 365
Platform
  1. Windows
The sheet where Range("A10:AT10") is located must be the active sheet where you run the macro or you can use the sheet as the qualifier, something like sheets("sheet1").Range("A10:AT10")
 

QualityControlQC

New Member
Joined
Sep 2, 2019
Messages
3
That is correct. I forgot to mention that the error also says "the extract range has a missing or invalid field name" which makes me think one of my columns got renamed but I copied the columns from the sheet I am receiving data from and pasted them on the sheet I am pasting to which has the macro on it.
 

Akuini

Well-known Member
Joined
Feb 1, 2016
Messages
2,575
Office Version
  1. 365
Platform
  1. Windows
So, is it working now?
 

Watch MrExcel Video

Forum statistics

Threads
1,108,979
Messages
5,526,020
Members
409,675
Latest member
audeser

This Week's Hot Topics

Top