+ Reply to Thread
Results 1 to 4 of 4

Run Time Error

  1. #1
    Registered User
    Join Date
    09-19-2017
    Location
    Michigan
    MS-Off Ver
    2016
    Posts
    10

    Run Time Error

    I have been trying to run a macro at work. I'm not particularly talented with writing code, but the error seems to happen when I use new computers. The place where the code fails is on this line:

    Sheets("Capture").Select

    As I understand it, all this is doing is selecting the sheet called Capture, which exists and is made visible through another line of code.

    The problem may be caused by switching from excel 2010 to excel 2016, as I am running a similar macro with slightly different inputs on another computer right now using 2010, and it seems to be working. Once it is complete I will try and run it the excel 2010 computer.

    There was another error related to the switch which I believe I have solved related to the references. I had a missing reference. Not sure if that is the root of the issue.

    The error I am receiving is 1004 runtime. It's as if it thinks the sheet doesn't exist.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Run Time Error

    In the Sheet "Capture" are there any leading or trailing spaces. That would cause this type of error. Likewise, if there are none in the sheet, but in your code.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: Run Time Error

    You haven't supplied the code to test it.

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: Run Time Error

    Hey Dave,
    You probably did not notice that this is a thread from 2017. Would be surprised if the OP ever checks back in.

    Alan

+ 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] Error message: Run-Time error '1004 '; application-defined or object-defined error
    By Davasu in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2015, 06:52 AM
  2. Replies: 1
    Last Post: 10-22-2015, 05:50 AM
  3. VBA ERROR: run time error 1004: Application-defined or Object-defined error in excel 2013
    By AnanthKrishna in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-13-2015, 06:16 AM
  4. Cannot Publish Excel Pivot Chart - Run Time Error
    By crisb184 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2013, 07:04 AM
  5. [SOLVED] Error " Run-time error '1004': application defined or object defined error
    By lengwer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-11-2013, 07:26 AM
  6. run-time error ;2147023179 (800706b5) time automation error interface unknown
    By karthik72 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-02-2012, 09:31 AM
  7. 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

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