View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default how to verify a sheet.visible = true?

sheets("x").visible = false 'I'd use xlsheethidden

should work.

If the sheet is already hidden, it just won't do anything noticeable.

If the sheet is visible, then it should be hidden.

But there are some cases where you can't hide the sheet.

Is this the only visible sheet in the workbook? Every workbook has to have at
least one visible sheet.

Is this the workbook's structure protected?
(via Tools|protection|Protect workbook in xl2003 menus)

Alberto Ast wrote:

I need to check if a sheet("X").visible is true or false
I mean if the specified sheet is visible I want to make it false but right
now it is failing in my macro because if it is false already it fail.


--

Dave Peterson