Thursday, October 18, 2007

Very hidden excel sheet

One of our Excel files is opening so slowly, so I decided to check if it is using some kind of macros. When I opened the macro editor I found this three-state option to set the visibility of a sheet.

  • -1: xlSheetVisible
  • 0: xlSheetHidden
  • 2: xlSheetVeryHidden
I was also curious why value one is missing from the sequence... I thought it has a "magic" meaning, so I checked an other property:


  • 0: xlNoRestrictions
  • 1: xlUnlockedCells
  • -4142: xlNoSelection
It seems a logical sequence.

Remarks: "The property xlSheetHidden hides the sheet, but it can be made visible by any user through the Excel user interface. If you use xlSheetVeryHidden, however, the user cannot make the sheet visible through the Excel user interface. " (msdn2)

1 comment:

Gusty said...

I'm sure Microsoft developer had his own "logical" reason for those constants :)