Results 1 to 4 of 4

Thread: VBA - Range of object _ Global failed

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Regular
    Joined
    Nov 2022
    Posts
    13
    Location

    Question VBA - Range of object _ Global failed

    Hi everyone!
    Yesterday i run this code and was all ok. But today i don't know why appear this error 1004.

    The error is in the line of the range.

    The code is:



    Worksheets("Encomendas_em_aberto").Range("A2:I" & lastRowZabr).ClearContents
        Worksheets("Zplan_producao").Select
        ActiveSheet.ListObjects("Z_Plan_Oficial").Range.AutoFilter Field:=2, _
            Criteria1:="=ABER"
        Range("A:A,B:B,E:E,F:F,G:G,I:I,J:J,K:K,R:R").Select  ----> ERROR
        Selection.Copy
        Sheets("Encomendas_em_aberto").Select
        Range("A1").Select
        ActiveSheet.Paste
        Rows("1:1").Select
        Application.CutCopyMode = False

    How resolve this?
    Last edited by Aussiebear; 11-03-2022 at 03:27 AM. Reason: Added code tags to supplied code

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •