Results 1 to 2 of 2

Type mismatch when selecting filtered cell

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Type mismatch when selecting filtered cell

    What am I doing wrong? I am getting a typemismatch on


    dateBeingBalanced = Range("a" & nrow).SpecialCells(xlCellTypeVisible).Value
    from the script below:


    
    dim nrow as long
    dim datebeingbalanced as string
    dim tasktotalhours as double
    
    With ws
    .AutoFilterMode = False
    
    .Range("Bs1:Bs" & .Range("Bs" & Rows.Count).End(xlUp).Row).AutoFilter 1, UserForm1.ticketid.Value
    TaskTotalHours = Application.WorksheetFunction.Sum(.Range("I2:I" & .Range("I" & Rows.Count).End(xlUp).Row).SpecialCells(xlCellTypeVisible))
    End With
    
    
    
    
    
    nrow = 2
    
    Do Until Range("a" & nrow).Value = ""
    
    
    
    
    
    dateBeingBalanced = Range("a" & nrow).SpecialCells(xlCellTypeVisible).Value
    This is only the beginning of the script which is why you don't see the end with/loop, etc. but it is stopping on the line I listed above. Any idea why that's giving me a type mismatch?
    Last edited by ks100; 09-11-2015 at 03:44 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Multiply two cell values VBA Type Mismatch
    By prjt in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-22-2015, 04:35 PM
  2. [SOLVED] Type mismatch error obtaining value from a cell
    By ssu95bm in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-09-2015, 09:30 AM
  3. [SOLVED] Run-time error '13': Type mismatch - How to work with Cell.value
    By beutlerm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2014, 01:18 PM
  4. [SOLVED] type mismatch on #name in cell
    By twckfa16 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-28-2013, 05:07 PM
  5. [SOLVED] Type Mismatch when selecting items from a listbox
    By Tayque_J_Holmes in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 04:46 PM
  6. Type Mismatch Error when deleting a cell
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2008, 01:07 PM
  7. Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 PM

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