![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Can I show one sheet tab and hide the others? I have items on 3 sheets but only want the user to see sheet 1.
|
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
A couple ways to do it:
(1) Format: Sheet: Hide (2) In VBA: Sheets("Sheet1").visible=false |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Southfield,MI USA
Posts: 1,027
|
You just want to hide the other 2 sheets?
The manual approach is to select the 2 sheets (by holding CTRL or Shift) then go use your Format Menu-Sheets-Hide. Of course if the ppl you send this to also know excel they could easily go to formatsheetsunhide unless you use some passworded sheet protection. Hope that helps somewhat, -please reply if you were actually shooting for something more complex though. Adam |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Yes a little more complex so that the casual user cant make the changes. Im guessing the use of some VB. And what about unhiding them? Thanks again.
|
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Mar 2002
Location: Boston, MA
Posts: 105
|
For VBA the code is something like this to hide all but the first sheet
Dim ws as Worksheet For Each ws in ActiveWorkbook.Worksheets If ws.index>1 then ws.visible=x1SheetVeryHidden '=x1SheetVisible to undo End if Next ws |
|
|
|
|
|
#6 |
|
New Member
Join Date: Apr 2002
Posts: 4
|
Can this be done so that the user can not go back and select unhide from the menu?
[ This Message was edited by: fred13x on 2002-04-24 09:33 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|