+ Reply to Thread
Results 1 to 4 of 4

run-time error 13 type mismatch

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    7

    run-time error 13 type mismatch

    Hey guys!

    Im kinda building a simple vba coding... And I am really new with this stuff... but somehow... I have to nail it... Could you be please so kind and have a look at this coding... hopefully, you might find the error, why it aint working... thank you very much!!

    Private Sub Worksheet_Activate()


    If Sheets("User Request").Range("C37:C43") = "" Then
    Range("A19:A164").EntireRow.Hidden = True

    ElseIf Sheets("User Request").Range("C37") = "X" Then
    Range("A19:A38").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C38") = "X" Then
    Range("A40:A59").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C39") = "X" Then
    Range("A61:A80").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C40") = "X" Then
    Range("A82:A101").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C41") = "X" Then
    Range("A103:A122").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C42") = "X" Then
    Range("A124:A143").EntireRow.Hidden = False
    ElseIf Sheets("User Request").Range("C43") = "X" Then
    Range("A145:A164").EntireRow.Hidden = False

    End If

    End Sub

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: run-time error 13 type mismatch

    hi,
    you can try this
    (if you want to set to false the hidden rows just change "1" to "0")
    Please Login or Register  to view this content.
    Regards, John55
    If you have issues with Code I've provided, I appreciate your feedback.
    In the event Code provided resolves your issue, please mark your Thread as SOLVED.
    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

    ...enjoy -funny parrots-

  3. #3
    Registered User
    Join Date
    04-11-2012
    Location
    Switzerland
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: run-time error 13 type mismatch

    Thanks John,

    looks much more "sexier" than what I wrote (which actually works...)..

    Please Login or Register  to view this content.
    Last edited by zbor; 10-23-2012 at 05:20 AM.

  4. #4
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel for Microsoft 365
    Posts
    2,028

    Re: run-time error 13 type mismatch

    hi,
    Glad you solved your issue!
    Please use code tags next time!

+ 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