Consulting

Results 1 to 3 of 3

Thread: RUNTIME 13: TYPE MISMATCH ERROR

  1. #1
    VBAX Regular
    Joined
    Nov 2018
    Location
    London, U.K.
    Posts
    99
    Location

    RUNTIME 13: TYPE MISMATCH ERROR

    When my workbook opens, I want it to open on a specific worksheet, and hide a few of the rows in that worksheet.

    My code is:
    Private Sub Workbook_Open()
    
    ThisWorkbook.Sheets("Guide").Activate
    
    
    ThisWorkbook.Sheets("Guide").Rows("9-60").EntireRow.Hidden = True
     
    End Sub
    I get mismatch error in the hide rows line of this macro and cannot work out why? Any ideas?

  2. #2
    Replace the - with :

  3. #3
    VBAX Mentor
    Joined
    Dec 2008
    Posts
    404
    Location
    Me.Sheets("Guide").Rows("9:60").Hidden = True


    Artik

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •