Results 1 to 3 of 3

Excel macro does not work when saving in Excel 1993-2003 format

Threaded View

  1. #1
    Registered User
    Join Date
    02-26-2012
    Location
    New York, New York
    MS-Off Ver
    Excel 2007
    Posts
    1

    Excel macro does not work when saving in Excel 1993-2003 format

    Hello there,

    I have a problem with a macro that worked fine in Excel 2010, but does not work, when I saved the file in Excel 1997-2003 format.
    (I am running Excel 2010 on a VmWare Fusion virtual machine running Windows 7 on my MacBook Pro.)

    The structure of the macro is as follows (some lines in between deleted). The purpose of the macro is to display certain rows of the sheet when a cell (F105) has a certain value and hide the rest of the rows.

    Private Sub CommandButton1_Click()
    Select Case Range("F105").Value
    Case 1
      Rows("111:212").Hidden = False
      Rows("214:3714").Hidden = True
    Case 2
      Rows("111:212").Hidden = True
      Rows("214:315").Hidden = False
      Rows("317:3714").Hidden = True
    ...
    Case 37
      Rows("111:3303").Hidden = False
    End Select
    End Sub
    When saving the workbook in 1993-2003 format, I get "Runtime error '13': Type mismatch". Before this, the macro worked fine.


    Any ideas how to solve this issue?


    Many thanks!
    Last edited by davesexcel; 02-29-2012 at 09:14 PM.

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