Results 1 to 19 of 19

Run-time error '-2147417848 (80010108)' When Deleting Table Row

Threaded View

  1. #1
    Registered User
    Join Date
    05-04-2018
    Location
    MD
    MS-Off Ver
    2016
    Posts
    20

    Run-time error '-2147417848 (80010108)' When Deleting Table Row

    Hello everyone,

    This error has been driving me crazy recently, hopefully someone has the knowledge in order to get past this error.

    I am creating a Protected user form for an invoice and keep getting this error whenever I delete a table row. The macro is ran by selecting a row, pressing a button, and the cell row selected inside the table is deleted. The thing is, this error doesn't happen if I clear the worksheet of Conditional Formatting, it only happens if I introduce this specific formula:
    =AND(COUNTIF(Category,$J14)>0,COUNTIFS($E$14:$E$17,$E14,$J$14:$J$17,$J14)>1)
    and applied to a table. Category contains a list of "Expenses" that I want to find duplicate lines, and it will highlight yellow. I also have some validation rules to mark cells that don't meet specific criteria, such as account number is beyond 10 chars, and if I keep that in, the delete table row macro runs fine.

    But, whenever I run this macro to delete a table row:
    Sub DeleteRow()
    
    Sheet1.Unprotect Password:="Password!"
    
    
        Dim rng As Range
        
        On Error Resume Next
        With Selection.Cells(1)
            Set rng = Intersect(.EntireRow, ActiveCell.ListObject.DataBodyRange)
            On Error GoTo 0
            If rng Is Nothing Then
                MsgBox "Please select a valid table cell.", vbCritical
            Else
                rng.Delete xlShiftUp
            End If
        End With
    Sheet1.Protect Password:="Password!"
    End Sub
    I get this error.

    Run-time error '-2147417848 (80010108)'
    Method 'Delete' of object 'Range' failed.

    I've created a new workbook, thinking it may be a corrupted excel file, but I still get this error message.

    Any thoughts?
    Attached Files Attached Files
    Last edited by mac_squared; 05-07-2018 at 08:00 AM. Reason: Changed font color to red, where debug says to check

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] UserForm1.Show run-time error '2147417848 (80010108)':
    By Faridwahidi in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-01-2014, 05:36 AM
  2. Excel 2010 - Intermittent Run Time Error -2147417848 (80010108)
    By PatKlaus in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-30-2013, 02:46 PM
  3. run time error on code -2147417848 (80010108)
    By batchjb69 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-20-2013, 07:16 AM
  4. run-time error '-2147417848 (80010108)
    By mjguest in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-10-2012, 12:50 PM
  5. Run time error 2147417848 (80010108) while closing window
    By knn9413a in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-01-2010, 11:41 AM
  6. Run-Time Error '-2147417848 (80010108)
    By SOS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-23-2008, 03:49 AM
  7. Run-time error '-2147417848 (80010108)'
    By tortoni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2007, 11:42 AM

Tags for this Thread

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