• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

VBA Run time error code : 1004

vijay.vizzu

Member
Dear Sir,


I have created a macro to filter data from master sheet. while running the code sometime it works fine, but sometime it show an error i.e. "Run-time error'1004: The extract range has a missing or illegal field name." . I can't able to resolve this error. Please help me.


Sub ShowData()

Sheets("UploadToCourier").Select

Range("b9").Select


Application.ScreenUpdating = False

Application.DisplayAlerts = False


Range(Selection, Selection.End(xlToRight)).Select

Range(Selection, Selection.End(xlDown)).Select

Selection.Clear

Range("b9").Select

ActiveWorkbook.Save


Worksheets("04X-SOUTH").Range("fltRange").AdvancedFilter _

Action:=xlFilterCopy, _

criteriarange:=Worksheets("UploadToCourier").Range("CourCriteria"), _

copytorange:=Sheets("UploadToCourier").Range("b9"), _

unique:=False


Sheets("UploadToCourier").Range("b9").Select


End Sub


Any help highly appreciated

Regards

Vijay
 
Hi.........sometimes even I used to get problem in advanced filter when used with VBa (specially when multiple people used to use it)....I would recommend you hide your critera which is "criteriarange:=Worksheets("UploadToCourier").Range("CourCriteria")" and run the macro.....hopefully
 
Hi Vijay ,


Googling this error gives a lot of results :


1. http://www.ozgrid.com/forum/showthread.php?t=49656


2. http://www.mrexcel.com/forum/excel-questions/290280-extract-range-has-missing-illegal-field-name.html


3. http://kenjun.wordpress.com/2008/08/13/excel-advanced-filter-and-the-extract-range-has-a-missing-or-illegal-field-name-message/


4. http://support.microsoft.com/kb/173112


Narayan
 
Back
Top