View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
isabelle isabelle is offline
external usenet poster
 
Posts: 587
Default macro for sheet hide

hi,

in ThisworkBook


Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Application.EnableEvents = False
For i = 1 To Sheets.Count
If Sheets(i).Name < Sh.Name Then Sheets(i).Visible = False
Next
Application.EnableEvents = True
End Sub



--
isabelle




Le 2012-02-18 12:23, kalpesh a écrit :
Hello,

a workbook contain 5 worksheet

i work in sheet1
i would like hide other sheets by macro

any help?