+ Reply to Thread
Results 1 to 8 of 8

Run-Time Error '-2147417848 (80010108)

  1. #1
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327

    Run-Time Error '-2147417848 (80010108)

    Hi folks,

    I'm using a piece of code to Data-Validate a couple of columns and it keeps falling over with the error message:
    Run-Time Error '-2147417848 (80010108)': Automation error. The object invoked has disconnected from its clients.

    The code stops at the red line below:

    Please Login or Register  to view this content.
    Can anyone enlighten me why this happens, please?

    Seamus

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    I think you need to specify both Formula1 and Formula2, even though Formula2 is unused.

    You may have discovered Excel's only quirk
    Last edited by shg; 05-21-2008 at 06:53 PM.

  3. #3
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373
    Hi

    Shouldn't Columns be qualified?

    Try adding the dot before Columns

    Please Login or Register  to view this content.
    HTH
    lecxe

  4. #4
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    Strange,

    I've tried again this morning and am getting a different error message:

    "Run-Time Error 1004: Application-defined or Object-defined error"

    Even having tried both your suggestions (shg and lecxe) I'm still having problems.

    If anyone has any other ideas on how to either deal with the issue or suggest another workaround I'd be grateful.

    Col B should only allow dates to be added (1 Apr - 31 Mar) and Col C should only allow numeric data. I thought that Data-Validation was the way to go and decided to add the code below to a button which would add the Data-Validation for me.

    But if there is other code out there along the lines of:

    DUMMY CODE:

    "For each cell in range" or "worksheet change"
    Cell.value must be numeric
    Next Cell

    or something similar I'd like to hear about it.

    Many thanks

    Seamus

  5. #5
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327

    Solved

    I changed my mind about using Data-Validation and chode to go down the Worksheet_Change route instead and now have the following code:

    Column A has name and code changes it to UPPERCASE on leaving the cell. Col B has date and if not entered in the correct format, shows error message and returns to the offending cell. Col C should be numeric and if not - shows error message and returns to the offending cell.

    Please Login or Register  to view this content.
    Hope this helps

    Seamus

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Your code will replace formulas with their uppercase results ...

  7. #7
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    shg,

    But none of the cells are having formulae entered - only Surname, Date and No of Days Leave taken.

    Thanks anyway

    Seamus

  8. #8
    Forum Contributor SOS's Avatar
    Join Date
    01-26-2004
    Location
    Glasgow, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    327
    shg,

    I think I see what you meant :
    the line If IsNumeric(Target.Value)

    I've now changed that part of the sub to:

    Please Login or Register  to view this content.
    Is that better?

    Thanks

    Seamus

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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