Results 1 to 6 of 6

Trying to find in this code whats causing error 13 Type mismatch

Threaded View

  1. #1
    Registered User
    Join Date
    10-14-2017
    Location
    Miami, Florida
    MS-Off Ver
    2016
    Posts
    83

    Trying to find in this code whats causing error 13 Type mismatch

    Good morning,
    I got this code and tested using sample sheet and worked

    But then i change the range And start to display error 13 Type mismatch.

    I read the following link but i can't identify the correlation of possible causes vs my code


    https://msdn.microsoft.com/en-us/vba...XM04lwSTgmg)()

    I need to see what's causing this error

    This is the range what i changed
    v = Range("T5:W" & Columns("T:W").Find("*", [T1], , , 1, 2).Row)
    Then i changed to S5:W and SW

    And this
    Range("Y5").Offset(0, c - 1).Resize(.Count).Value = Application.Transpose(.Keys)
    Changed to

    Range("X5").Offset(0, c - 1).Resize(.Count).Value = Application.TRANSPOSE(.Keys)
    Then above line is Highlited

       Sub FilterDay()
    
       Dim v, s, r&, c&, i&, j&, k&
        
        v = Range("S5:W" & Columns("S:W").Find("*", [S1], , , 1, 2).Row)
        
        With CreateObject("Scripting.Dictionary")
            .CompareMode = 1
            For c = 1 To UBound(v, 2)
                For r = 1 To UBound(v, 1)
                    If InStr(v(r, c), ",") Then
                        s = Split(v(r, c), ",")
                        For j = 0 To UBound(s) - 1
                            For k = j + 1 To UBound(s)
                                If s(j) > s(k) Then: Temp = s(k): s(k) = s(j): s(j) = Temp
                            Next k, j
                        .Item(Join(s, ",")) = ","
                    End If
                Next r
                
                Range("X5").Offset(0, c - 1).Resize(.Count).Value = Application.TRANSPOSE(.Keys)
                .RemoveAll
                
            Next c
        End With
      
    End Sub

    Thanks in advance !!!!
    Last edited by AndyJr; 05-16-2018 at 06:31 AM. Reason: following rules, html brackets

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Type Mismatch causing me issues
    By lediable007 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-11-2016, 10:23 PM
  2. Help with VBA Type 13 Mismatch error code
    By nealasmothers in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2015, 04:07 PM
  3. [SOLVED] Using Range.clearcontents causing type mismatch error in code
    By Captian LDS in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-28-2014, 04:54 PM
  4. Type Mismatch in my code, whats wrong?
    By Simon.Ward in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-21-2013, 11:42 AM
  5. type mismatch error in code
    By strikeofdawn in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2008, 08:34 PM
  6. Type Mismatch error in VBA code
    By bobby in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-10-2005, 04:10 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