VBA to Hide and Unhide Rows using an activex check box

Can someone help me make this more efficient? It is running around 10 seconds. Thanks much!

I've adapted this code to hide rows that contain "Hide" as the result of a formula in column A of my worksheet.

Sub Hide_Rows() Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = False With ActiveSheet For Each cell In .Range("a7:a115") If cell.Value = "Hide" Then cell.EntireRow.Hidden = True End If Next End With Application.ScreenUpdating = True End Sub

I have a similar Show_Rows sub that unhides the hidden rows. I have linked the button result (True or False) to cell A1 and then I'm using an If statement to either Hide_Rows or Show_Rows in the check box VBA

Private Sub CheckBox1_Click() If Cells(1, 1).Value = True Then Hide_Rows Else Show_Rows End If End Sub

-------------Problems Reply------------

Your problem may be with lots of complicated formulas like David Zemens says. You have the right idea with the Application.Calculation but it should be Application.Calculation = xlCalculationManual at the start, and then Application.Calculation = xlCalculationAutomatic at the end.

Category:excel Views:0 Time:2019-01-09

Related post

  • Automatically hide and unhide rows using a macro 2012-08-04

    Hi, i am trying to use a macro that automatically hides and unhides rows (A19:A500). Specifically, I want my macro to hide the entire row if its cell in column A is blank, and i want it to unhide the cell if its cell in column A has text (i.e. if A20

  • Auto hide and unhide row in an excel spreadsheet. 2012-08-22

    Sorry I'm such a basic user looking for an advanced way to do it. I've used some macros from a few things I've found online but I can't seem to find something for this. I have sheets that I want to auto hide **and** unhide rows based on a particular

  • I need to find a way to hide and unhide rows based on the selection 2012-12-09

    Hi I have a form: on top there is a drop down box with some selections - I need to find a way to hide and unhide rows based on the selection. Example C7 : if user picks Selection 1 then range b19 to B20 should be visible, everything else hidden C7: i

  • hide and unhide rows based on a radial button selection 2012-12-11

    Hi, I am not very familiar with VBA but i noticed VBA is an excellent tool for my problem. I have a workbook with 7 sheets of menus and one order form. i need a VBA code that will unhide a row when a radial buttom is selected and then hide the row wh

  • Hide and unhide column using cell value 2014-07-27

    Hi I have to develop an excelsheet where a column is hidden automatically if the value in Row "3" is 1 and unhide the column automatically if the value in Row "3" is 2. And this has to work for all columns An example: Column F cell F3 = 1 -> autom

  • Hiding and Unhiding rows using + and - signs 2012-09-01

    I've seen in pivot tables that collums can be hidden by hitting a - button above the collumns and then the can be expanded back to their normal size by hitting a + sign. I wanted to know if/how I can insert these + and - signs into a spread sheet to

  • How to hide and unhide rows in excel tab using VBA Macro when the values in the range change with data validation parameters 2014-07-26

    Hi , I have a report where in i want to hide the rows which has zero appearing as value ( due to formula calculation ) , the rows should unhide automatically as i change the data validation in cells AE8 , AE9 from one parameter to another parameter.

  • make a button to hide and unhide rows based on blank cell in column b 2013-12-01

    Hi I have a worksheet that has columns A to AB and rows 11 to 30. Users will input data into Column B. When they finish inputting, I would like them to be able to click a button titled "HIDE blank rows" which will hide all rows below the last input i

  • Micro to hide and unhide rows 2012-04-08

    Hi All, I would like to hide rows E:10 to E:15 if the value of Cell E:10 is between -100 to 100 OR Cell F:10 is in between -10% to 10%. Next it will check line E:16 OR F:16 if value between -100 to 100 or -10% to 10% will hide rows E16 to E21. This p

  • How to make conditional to hide and unhide discontinuous rows 2014-11-12

    Hello, I am trying to write a conditional statement in VBA to hide and unhide a set of rows based on a cell value. I have done some small macros before but this is much more complicated for me. I have searched a few sites looking for an answer and de

  • macro assigned to buttun that hides blank rows and unhides rows with values 2013-06-17

    Hi, I need a macro that can be assigned to a button that will hide rows that are blank, and unhide rows with values in them, the range is from row 6 - row 55 --------------Solutions------------- ok, search for blank cells in rows 6- 55 but, blank cel

  • How can I show and hide a table row using jQuery? 2009-06-23

    I have a regular HTML table, how can I show and hide a table row using jQuery? --------------Solutions------------- Hides every 5th row: $('tr:nth(5)).hide() An example: http://jsbin.com/epeto Either iterate the tr elements inside your table or add i

  • Hide and Unhide Columns Based on Value in Excel 2007 and Excel 2010 2013-05-06

    My father wants to use VBA scripting to hide and unhide columns based on value. He has a cell in which a month and year is input. Below that, the days of the month are displayed (1-31). What he wants to do is have unneeded columns be hidden. For exam

  • Checkbox macros hide and unhide on another sheet 2013-07-15

    Hello, In this attached file link I would like to keep the current macros that I have and add the following: A macros that can link the check boxes with the corresponding categories and rows in the other two sheets. If the box is checked the correspo

  • button item lost when hide and unhide toolbar 2010-03-12

    i dont know, why the button are disappear after the toolbar set to hide and unhide. how can i fix it? setup a button code -(void)viewDidAppear:(BOOL)animated { //NSLog(@"viewDidAppear "); [self becomeFirstResponder]; //Create a button UIBarButtonItem

  • C# hide and unhide comments 2012-01-02

    I am trying to find solution how to hide and unhide comments in VS2010. What i found is: # region comments for code #endregion and: http://holyhoehle.wordpress.com/2010/01/17/hide-comments-in-visual-studio/ but this one is not working in VS2010 or i

  • i am having trouble with the hide and unhide command It is ghosted 2013-03-08

    i am having trouble with the hide and unhide command It is ghosted --------------Solutions------------- Hi FerdinandOkonkwo, Have you made any recent changes on the computer? Are you referring to MS DOS commands or any other program commands? What ar

  • How to hide and unhide different tables in Microsoft Word 2013? 2013-08-30

    Hello Team, I have a MS Word 2013 document that should be used by teams "A" and "B" In the first section of the document we have a couple of questions with dropdown options where the users will choose which team they belong to. If Team "A" is selecte

  • Protect and Unhide rows 2013-11-24

    Hi The worksheet is protected if person needs to expand the worksheet I created a botton with the following macro Sub HideUnhide() ActiveSheet.Unprotect "Ginger" Rows("33:49").Select If Selection.EntireRow.Hidden = False Then Selection.EntireRow.Hidd

  • Hide and Unhide and array of worksheets? 2013-12-04

    I want to hide and unhide groups of worksheets in a workbook. I recorded a macro to hide several. This works Sheets(Array("Cost Summary", "Actual Material", "Actual Labor", "Actual Equip", _ "Actual Sub")).Select Sheets("Cost Summary").Activate Activ

  • Hide and unhide with charts on worksheet 2015-01-03

    When I hide and unhide columns and rows on worksheet to set up my chart with certain info it works fine. When I unhide so I can print it changes my charts. Why? How do I stop this? --------------Solutions------------- Charts have an option to show da

  • how can I hide and unhide the menues in menupath with asp.net/C# 2012-04-02

    I want to hide and unhide the menus in menupath by user access ,how can I do this?I mean I want that some users can see just some part of menus and other part should hide from them --------------Solutions------------- You should probably implement ro

  • having problems rec. a macro to hide and unhide columns 2012-10-10

    I've not tried this before but wanted to create a simple button to hide and unhide column's in excel. I've been successful creating one to un-hide multiple column's but when it comes to hiding them it hides the wrong ones. I'm doing this by recording

  • Hide and unhide navigation pane with code in Access 2007 VB 2013-01-15

    How do you hide and unhide a navigation pane in Access 2007. This is how the property code was set in an older version of access. This would also hide the menu bar in the older version. Sub SetStartupProperties() ChangeProperty "StartupShowDBWindow",

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.165 (s). 11 q(s)