Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default macro for sheet hide

Hello,

a workbook contain 5 worksheet

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

any help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
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?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default macro for sheet hide

Do you mean working in Sheet1 specifically or any sheet you are
working on?

If you do hide them will you want some method of uh-hiding later?

Isabelle's code works on whichever worksheet is currently in use.

If you un-hide a sheet through FormatSheetUnhide then it swaps with
the sheet that was visible.

Is that what you want?


Gord



On Sat, 18 Feb 2012 11:23:30 -0600, kalpesh
wrote:

Hello,

a workbook contain 5 worksheet

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

any help?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to hide column based on value on another sheet CH Excel Programming 3 August 3rd 07 04:32 PM
How do I hide certain columns in a sheet with merged cells in a row using a macro? Dan E[_4_] Excel Programming 5 December 3rd 06 08:47 PM
If I have a work sheet protected and try to run a macro to hide rows or columns it won't work. Correct? Marc Excel Programming 2 July 12th 06 04:10 AM
Macro to hide a sheet Kent McPherson[_3_] Excel Programming 3 July 28th 05 02:54 PM
Hide/unhide sheet macro based on cell calculation Greg Fisher Excel Programming 3 May 26th 05 05:58 PM


All times are GMT +1. The time now is 04:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"