+ Reply to Thread
Results 1 to 3 of 3

run time error on code -2147417848 (80010108)

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    01-16-2013
    Location
    london
    MS-Off Ver
    Excel 2007
    Posts
    136

    run time error on code -2147417848 (80010108)

    Hi ive created the below code but get runtime error when it reaches the "Worksheets("EXPOSURE_REPORT_4_AA").UsedRange.Clear" line of code. Any ideas why
    "
    Sub Create_AA_Exposure()
    
    Dim TGLASTROW As Long
    Dim EXPLASTROW As Long
    
    Worksheets("TRADING GROUPS").Select
    
    TGLASTROW = Range("A" & Rows.Count).End(xlUp).Row
    
    Worksheets("EXPOSURE_REPORT_4_AA").Select
    Worksheets("EXPOSURE_REPORT_4_AA").UsedRange.Clear
    Worksheets("joined").UsedRange.Copy
    Worksheets("EXPOSURE_REPORT_4_AA").Select
    ActiveSheet.Paste Range("A1")
    Range("B2").Select
    ActiveCell.EntireColumn.Insert
    ActiveCell.Value = "TG Y/N"
    ActiveCell.Offset(1, 0).Select
    
    'lookup to Trading group table
    
    ActiveCell.Formula = "=VLOOKUP(E3,'TRADING GROUPS'!$I$3:N514,6,0)"
    
    'Range("N3").Formula = "=if(isna(VLOOKUP(A3,'OLD SHEET'!A$3:N$" & lastrow & ",14,0)),N,VLOOKUP(A3,'OLD SHEET'!A$3:N$" & lastrow & ",14,0))"
    
    End Sub
    Last edited by batchjb69; 12-20-2013 at 07:18 AM.

  2. #2
    Forum Contributor
    Join Date
    06-22-2011
    Location
    somerset
    MS-Off Ver
    365
    Posts
    330

    Re: run time error on code -2147417848 (80010108)

    ClearContents instead of Clear
    Sub Reputation()
    Dim Problem as Variant
    Dim Reputation as Integer
    For Each Problem in Forum.Threads
        If Problem.Title = "*[Solved]*" and Solver.Name = "Leon V (AW)" Then Reputation = Reputation + 1
    Next Problem
    End Sub

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,028

    Re: run time error on code -2147417848 (80010108)

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    Never use Merged Cells in Excel

+ 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. Replies: 7
    Last Post: 05-15-2013, 09:02 AM
  2. run-time error '-2147417848 (80010108)
    By mjguest in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-10-2012, 12:50 PM
  3. 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
  4. Run-Time Error '-2147417848 (80010108)
    By SOS in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-23-2008, 03:49 AM
  5. Run-time error '-2147417848 (80010108)'
    By tortoni in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-21-2007, 11:42 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