Hiding Various Worksheets

Sep 7, 2009

I have a spreadsheet with 5 worksheets going, I've been trying to find code that will hide and unhide certain tabs depending on the answer to C21 of Worksheet 1.

If C21 = 1 then show sheet 3 but not 4 or 5
If C21 = 2 then show sheet 4 but not 3 or 5
If C21 = 3 then show sheet 5 but not 3 or 4.

View 5 Replies


ADVERTISEMENT

Re-hiding Worksheets

Jan 13, 2010

I need to unhide all hidden sheets in a workbook, run some marcos on the hidden sheets, then re-hide only the sheets that were hidden. For each workbook the number of hidden sheets will vary as will the names of the sheets. Is there a way to capture the current hidden worksheet names before I unhide all worksheets and apply the captured names for re-hiding?

View 9 Replies View Related

Hiding Multiple Worksheets With VBA

Feb 2, 2014

I have a workbook with 16 different worksheets. The first worksheet is what I'm calling a table of contents where I have created ActiveX Control Buttons that I would like to attach VBA Sub procedures to. The sub procedures I'd like to include are, as an example, hide all worksheets except worksheets 1and 2. Then I'd have another button to enact the code that says hide all worksheets except worksheets 4 and 6. I have specific names for each worksheet but hopefully that doesn't matter. I've been trying to figure out why the below doesn't seem to work.

Option Explicit
Sub Division_1and2 ()
' Open the Division 1 and 2 worksheets for data entry.
'
Sheets(Array("Division 3", "Division 4", "Division 5", "Division 6", "Division 7", _
"Division 8", "Division 9", "Division 10", "Division 11", _
"Division 12", "Division 13", "Division 14", "Division 15")). _
SelectSheets.Visible = xlSheetHidden
Sheets("Division 1").Select
End Sub

Instead of xlSheetHidden I've also used the term False to no avail.

View 3 Replies View Related

Conditionally Hiding Worksheets

Jun 21, 2006

I have what on the outset seemed a fairly basic task. In VBA I wanted to conditionally hide worksheets based on a value in my main worksheet.

I have 1 "main interface" worksheet with quite a few "result" worksheets as part of my workbook. Instead of scrolling left and right in the tabs menu everytime I wanted to veiw a particular worksheet I wanted to rather hide all the worksheets except the "main interface" and the relevant "result worksheet", which excel would identify based on a value in my main worksheet.

I wrote the following VBA code to do this but for some reason I cannot get it to work correctly. Perhaps I have made a simple logic error? I am fairly new to VBA. Any advice? ......

View 9 Replies View Related

Hiding And Unhiding Two Sets Of Worksheets

Oct 11, 2008

My Workbook has 72 worksheets split into two. The first 36 include all the data, but the second 36 have one element removed.

I am very grateful to RoyUK and others who have steered me towards some code that allows me to hide and unhide the first 36 sheets exactly as I want, but when I add the second 36 the code comes up with an error saying the Procedure is too large.

I did want to split the code into two parts activated by two validated drop down menus, but this did not work either.

If I have two drop down menus at D8 and G8 is it possible to have two separate codes as follows

View 11 Replies View Related

Runtime Error '9' - Hiding Worksheets Based On Cell Value

May 6, 2009

I'm relatively new to this, and its entirely possibly (more likely probable) that I am attempting to this in the wrong way, but here's what I'm dealing with...

View 8 Replies View Related

Excel 2010 :: Hiding Worksheets When Closing File?

Apr 28, 2012

I am using MS Excel 2010.

What I want to Hide two worksheets and leave one worksheet open when I close out the file.

ws TOC will remain open when closing out the file
ws Rqmts will hide when closing out the file
ws Planning will hide when closing out the file

View 1 Replies View Related

Excel 2003 :: Hiding Rows Based On Conditions On Two Worksheets?

Jan 4, 2013

I have two worksheets (Sheet1 and Sheet2). Based on meeting a condition on Sheet1 AND Sheet2, I'd like to use macros to automatically hide rows on Sheet2.

Sheet1 sample:
Type
Selection

[Code]...

The conditions are: If on Sheet1, a Type has the Selection "Include", then any rows on Sheet2 which have that same Type are shown (ie. not hidden).

If on Sheet1, a Type has the Selection "Exclude",then any rows on Sheet2 which have that same Type are hidden.

So in the example tables above, if ONLY Type A = Include, then on Sheet2, the rows for Sample URL1 and Sample URL2 are shown, and the others are hidden.

Also in the example tables above, if Type A = Include AND Type B = Include (and all other Types are Exclude), then on Sheet2, the rows for Sample URL1, Sample URL2 AND Sample URL3 are shown, and the others are hidden.

I'm fine with the concept of If... And... on the same worksheet, it's trying to get it to look at two separate worksheets I'm struggling with!!

View 3 Replies View Related

Excel 2003 :: VBA / Hiding Rows Based On Three Conditions On Two Different Worksheets

Jan 14, 2013

I have a workbook with two worksheets, Sheet1 and Sheet 2. Based on the data entered in the 2nd column on Sheet1, I'd like a macro which hides rows for Events which do not meet the criteria entered on Sheet1.

So in the example below, on Sheet2, I only want to see rows where the Country=Scotland, AND the Location=Glasgow, AND the Start Date is greater than (or equal) the Start Date on Sheet1.

Sample of Sheet1
Country
Scotland

Location
Glasgow

Start Date (dd/mm/yyyy)
30/04/2013

[code]....

So in this scenario, only the FIRST row meets the 3 criteria (Scotland, Glasgow, date after 30th April), thus all the other rows should be hidden.

View 6 Replies View Related

Excel 2010 :: Sort Worksheets Alphabetically And Keep The Data In Worksheets

May 15, 2013

I have read that there is a VBA macro in F11, but I also read that it would only sort the workshhet names, but not the data. I have Excel 2010.

View 2 Replies View Related

Loop Through Worksheets Not Working (delete Some Hyperlinks In Column A On 50+ Worksheets)

Jan 16, 2009

Just need to delete some hyperlinks in column A on 50+ worksheets. Thought a loop through all the worksheets would do it. Only works on active sheet. Forgive my ignorance, don't really even know where it goes, once it works - module or workbook?

View 2 Replies View Related

Copy Cells / Range From Worksheets Positioned Between Two Worksheets

Jul 7, 2014

Let's say I have a workbook with 7 worksheets named, for example, "Instruction", "Begin", "Worksheet 1", "Worksheet 2", "Worksheet 3", "End", and "Data". (in that order)

What I want to do is run a macro to go to whatever worksheet that is in between "Begin" and "End" and copy, for example, cells $C$1:$D$10; then paste as formula into worksheet "Data" starting from cell C1 and then down a list (i.e., copied cells from "Worksheet 1" get pasted as formula into "Data" cells C1:D10; then copied cells from "Worksheet 2" get pasted as formula into "Data" cells C11:D20, and so on and so forth).

But if I were to add more worksheets (e.g., "Recipe" and "ToDo") positioned in between "Begin" and "End" and run the macro again, it'll either 1) re-copy all the formulas from the included worksheets back into "Data" including the formulas from the newly added/placed worksheets or 2) it'll add the formulas from the newly added/placed worksheets and paste into "Data" at the end of the list.

Can create the macro to run based on the position of worksheet, and not based on the name of worksheet, since ultimately there will probably be over 10 worksheets between "Begin" and "End".

View 4 Replies View Related

Loop Across Worksheets: Perform The Same Process To All The Worksheets In My Workbook

Aug 10, 2009

I'm trying to perform the same process to all the worksheets in my workbook. This is the code I have now, but it will only apply to the single active worksheet:

View 2 Replies View Related

Hiding Cells That Are Not Used

Mar 10, 2014

I've created a spreadsheet that will be protect for use by others. I want to hide cells that are not used so it just leaves to print area in view and gives a simple and clear look.

I know how to hide rows, columns etc but there are always further rows and columns there. I'm sure this must be simple.

View 1 Replies View Related

Userforms Not Hiding?

May 28, 2014

I have a VBA application that seems to work fine under vista but once I start working with it in Windows 7 I notice sometimes one of my userforms do not go away when asked to hide. The code is like follows:

Application.ScreenUpdating=true
Waitingform.Hide

View 1 Replies View Related

Hiding Rows...

Jul 1, 2009

I have two command buttons, and need one macro that would hide all blank rows between columns "E" and "O" and from row 9 to 42, and then another macro that would unhide all these rows again.

View 2 Replies View Related

VBA For Hiding Rows?

Oct 29, 2012

I am building a real estate model. What I am trying to do is the following:

If I enter the number of tenants in a cell (let's say the number of tenants is 6 and the cell I enter this number in is cell J11), I would like 6 of 15 rows to be shown below (rows 46-60). Therefore, the 9 unused rows (rows 52-60) would be hidden from sight. Furthermore, if I entered the number 3 for the tenant count, excel would hide 12 rows (rows 49-60). I am sure that this is a VBA code.

View 1 Replies View Related

Form Hiding On Own

Aug 3, 2007

I am useing a user Form

On the Form which I call my main menu, theres a help button, with this code

Private Sub cmdHelp_Click()
MsgBox ("Help file not ready yet, good luck on your own, Have a Nice Day!")
End Sub
For some reason when this is click, and after the user clicks ok on the msgbox, the frmmain, which this command is on, minimizes itself

View 9 Replies View Related

Hiding UserForms

May 7, 2008

I'm trying to hide a UserForm (using myFrm.hide) once the command button on the form is clicked. I'm getting the following error:

Run-time error '402'
Must close or hide topmost modal form first.

Apparently the form isn't the 1st in the z-order. How can I see the z-order of my forms?

View 9 Replies View Related

Hiding An Autoshape

May 14, 2008

Seems like this should be pretty cut-n-dry to me...I thought I could "hide" an Autoshape (AutoShape 19) using some formula [I.E. =IF(B12="","",SUM(C37:C45)) ] but I cannot get it to work...

Basically I dont want to see the shape if there is no data D49.

View 9 Replies View Related

Hiding Checkboxes

Jul 21, 2008

I am trying to use the following
[code] ....

and modifying it to:

If Sheets("TPM").Range("al13").Value = 2 Then ActiveSheet.Shapes("Check Box 391").Visible = True

The first one works OK, but when I try to add an if / then statement, it gives me an error message.

I want to hide Check boxes 391 through to 426, using a single macro.

View 9 Replies View Related

Hiding Tabs

Feb 1, 2009

hi ive made macros on excell conecting my sheets so i dont need my tabs how can i hide them and then when i need them view them again.

View 9 Replies View Related

Hiding Sheets

Jun 11, 2009

A workbook with 7 sheets in it. The first sheet contains buttons with macros that when clicked will navigate you to different sheets in the workbook based on what button you click. Here's what I want to do. When the workbook is opened, I want it open to that first sheet with the buttons, but show no other tabs for the other sheets at the bottom. And then when that button is clicked on the first sheet to go to a different page, I want that page to be the only visible tab in the workbook with the rest still hidden. Is that doable? I already have the buttons and codes and everything for the navigation part down, I just need to have the other hidden when I'm on a different sheet.

Sub Button10_click()
Worksheets("Account Type").Activate
End Sub
Sub Button11_Click()
Worksheets("Name Change").Activate
End Sub
Sub Button12_Click()
Worksheets("Address-Phone").Activate
End Sub
Sub Button13_Click()
Worksheets("Main Menu").Activate
End Sub
Sub Button15_Click()
Worksheets("Cust-Owner").Activate
End Sub
Sub Button16_Click()
Worksheets("Misc").Activate
End Sub

View 9 Replies View Related

Hiding A Row If Value Equals 0

Jun 16, 2009

how to hide a row if a value in a cell equals zero?

View 9 Replies View Related

Hiding Rows With A Cell Containing 0

Oct 25, 2006

a bit of code so that when I open a sheet (which takes data from another sheet) it hides rows which contain a zero in a certain cell?

View 10 Replies View Related

Hiding Standard Toolbar

Oct 2, 2008

I use Excel 2000.

I want to hide all toolbars when I work.

I know how to hide them during a session, but when I exit and reboot Excel, the "standard" toolbar always returns.

Is there some way to hide the "standard" toolbar permanently?

View 8 Replies View Related

Hiding Sheet Tabs

Oct 13, 2008

Hiding sheet tabs. can you hide tabs on excel?

View 4 Replies View Related

Hiding Cells In Worksheet

Nov 11, 2008

I've created an Excel spreadsheet (Excel 7) to help me price sign printing jobs consistently. In my spreadsheet a few cells allow me to enter markups for materials & labour rates. These are used for calculating the retail price.

I would like to give my spreadsheet to some of my customers so they can calculate the retail price of a job themselves BUT, I would like to hide the contents of those few cells where I fix the markup. How can I achieve this?

View 3 Replies View Related

Hiding The Duplicates Values..

Sep 4, 2009

I'm trying to hide all but one duplicate value in a list; I have a report that can give multiple results for each record, but to make it cleaner to read I want to hide the duplicate values, such as customer names etc. after they have first appeared. I'm aware this may not be a very clear explanation so have attached an example spreadsheet.

The left-hand list is similar to what I would start with and the right-hand list is what I am looking to achieve. Conditional formatting will format duplicates but will obviously all to all and can't use the remove duplicates function as it will take away the unique values alongside them in the row. Preferably I'm after a solution that works in both '03 and '07 but it's not a disaster if I can only do it in '07.

View 5 Replies View Related

Hiding Cells If Empty

Jan 21, 2010

I was wondering what would be the best way to go about hiding either rows or columns based on whether a particular cell is empty or not. The reason being, I want a graph and table to only display data when present.

View 14 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved