+ Reply to Thread
Results 1 to 4 of 4

VBA run-time error

  1. #1
    Registered User
    Join Date
    09-10-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    VBA run-time error

    Hello,

    I have the following VBA code in an excel worksheet. It worked fine until recently then it started throwing a run-time error. If I comment out the 4th line of code it doesn't error out but of course it also doesn't work.
    The error it throws is:

    Microsoft Visual Basic
    Run-time error ‘2147417846 (80010108)’:
    Method ‘Value2’ of object ‘Range’ Failed

    Any idea how to make it work and why it stopped working? I'm using Office 2010. Thanks in advance, John

    Please Login or Register  to view this content.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    8,031

    Re: VBA run-time error

    Hi,

    I suspect this is error is being caused by something else in your workbook as I get no error with your code in a test workbook.
    One thing I will say is, the mere fact the code runs and changes the contents of the target cell to Proper case fires the sub again, and again and again.. That could result in an error when Excel decides enough is enough.

    Try this slight rewrite and see if you still get the error.
    Please Login or Register  to view this content.
    BSB

  3. #3
    Registered User
    Join Date
    09-10-2013
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: VBA run-time error

    Hi,
    That seems to have done the trick, how do I mark it solved?
    Thank you,
    John
    Last edited by jbjohansen; 06-30-2020 at 03:26 PM.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    8,031

    Re: VBA run-time error

    Glad I could help

    To mark the thread as solved, select Thread Tools from the menu link above and mark this thread as SOLVED.

    BSB

+ 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