+ Reply to Thread
Results 1 to 7 of 7

Execution error 1004

  1. #1
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    2007
    Posts
    87

    Execution error 1004

    Strangely, my code was working just fine and now I can't run it anymore.

    Please Login or Register  to view this content.
    The line in red doesn't run.
    Last edited by SIMBAtheCAT; 06-25-2014 at 10:52 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Execution error 1004

    Where is the data in Worksheets(2)?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    2007
    Posts
    87

    Re: Execution error 1004

    From range("A1", "BG46") and the rg the code is looking for is in cell "B4".

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Execution error 1004

    You can't offset 3 rows to above row 1, that would be off the worksheet.

  5. #5
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    2007
    Posts
    87

    Re: Execution error 1004

    Found the problem!

    When my wbTarget workbook is not on the exact sheet(2) then the code doesn't run... That is unfortunate.

  6. #6
    Registered User
    Join Date
    06-03-2014
    MS-Off Ver
    2007
    Posts
    87

    Re: Execution error 1004

    Added the bold line and everything works fine.

    Thank you Norie for your fast replies again.

    Please Login or Register  to view this content.

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Execution error 1004

    You could also do it like this.
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] VBA Code Error Upon Execution
    By MacroMan87 in forum PowerPoint Programing
    Replies: 4
    Last Post: 09-21-2013, 01:28 AM
  2. VBA error during execution at Exit Sub
    By sportsguy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-02-2013, 01:32 PM
  3. Error "run-time Error '1004': General Odbc Error
    By D4WNO77 in forum Access Tables & Databases
    Replies: 2
    Last Post: 07-16-2012, 09:55 AM
  4. Execution error 91
    By afortes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2010, 07:00 AM
  5. Error execution Report
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 05-28-2010, 05:21 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1