toggle button

  1. W

    Toggle button code to add shape and hide shape

    I am trying to create a code for a toggle button. I want a circle to appear around the button when it is clicked, and I want the circle to be deleted or hidden when the button is clicked again. I'm VERY VERY new to this. I thought I had it but I keep getting an error. This is what I have so...
  2. D

    Changing the toggle button setting during another macro i.e., without physically clicking it

    Hi Folks, I have a Toggle button on one of my sheets called: LocationFormat. It works a treat. My question is: can I add VBA code to another macro in order to turn off or turn on the Toggle button, i.e. so it automatically changes state when I run another macro? Kind regards, Doug.
  3. A

    Layered Toggle Buttons

    Can two separate toggle buttons cover a similar range? Let me explain... Essentially I want them to work together very similar to a file tree Category 1 Child category 1 Data Data Data Child category 2 Data Data Category 2 First I placed all...
  4. S

    hide button for rows based on cell value

    hello everyone, i need a button that hides and unhides rows based on cell value of the column (No. Date) if the date is more than 6 days ago it becomes hidden, and whats left is the recent ones which are this week. but i can hide and unhide it whenever i want that’s important it’s important...
  5. S

    toggle button to hide columns

    i have this toggle button code that hides and unhides for me column E and D but now i want to also hide column P at the same time with them but without hididing the columns between them i just want to hide E,D,P i use this code but i’m writing this on my phone but just to get an idea private...
  6. T

    ToggleButton hide columns under conditions

    Hi all, I have the code below now, but when I manually hide a column (for example column C) and use the toggle button twice, column C is visible again and I want it to stay hidden. Is there a possibility to do that? Private Sub ToggleButton1_Click() Dim xAddress As String xAddress = "A:Z" If...
  7. S

    Create a ToggleButton

    I believe I would like to create a ToggleButton. With my limited development background, I believe I want to layer an invisible togglebutton over a cell, so that the user, when they click on the cell will change the visual properties between three states: TRUE - green background with...
  8. C

    Using Shapes as Toggle Buttons

    This is originally asked on Excelforum.com here is the link: https://www.excelforum.com/excel-programming-vba-macros/1262270-using-shapes-as-option-buttons.html The goal is to have about 20 shapes that are tied to each other, where if you select one "On" you can choose which shapes are...
  9. M

    Spin Button VBA

    Hi I would like toggle using a spin button left and right through cells I15, AN15, BP15, CU15, DY15, FD15, GH15, HM15, IR15, JV15, LA15, ME15. Please advise EDIT: I need help to toggle through rages using a spin button left and right. I15:AN14, AN15:BP14, BP15:CU14, CU15:DY14, DY15:FD14...
  10. DDRA Steampunk

    Am I using too many arrays?

    Solved right after initial post (by experimenting). :stickouttounge: I need to autohide a crazy huge number of rows in one sheet, it currently has 9 sub tables (see Sample 2), and may need 11. Page not included because it's about 10 paper sheets long. Trying to get all arrays on one toggle...
  11. A

    Hide/Unhide toggle button which changes colour and text in vba

    Hello I've been trying to write some VBA to set up a toggle button to hide multiple predefined columns. I initially managed to define the code for the hide/unhide toggle and attached this to a shape I then wanted a toggle button which would then change the colour of the button and text...
  12. DDRA Steampunk

    How would I combine button 1 and 2? Can I use a With?

    I know I can combine more than one function on a button (as I have on each of these buttons), but I had no luck trying to combine the 2 buttons into 1. Seems like I should be able to do it with a "With" but I can't seem to make it work. I think it must have something to do with where I place the...
  13. A

    Display only columns with certain text

    Hi all, Please teach me how I can display only columns with certain text in Excel 2007? There are a lot of help on filtering rows but I am hoping to create either a toggle button or set up a reference cell (say "B4") along with a VBA to display columns with selected days only. For example...
  14. N

    VBA Toggle Button to change functionality

    Hello, I am working on creating a toggle button for a complicated spreadsheet. What is supposed to happen is when the toggle is pressed a formula is supposed to drive 4 investment levels keeping all four at the same ratio as when the toggle was pressed. When the toggle is released, the...
  15. K

    Using a Toggle Buttons to Hide Rows Based of a Value or Text in a Column

    I am trying to use macros to hide certain rows based on a value of a column which is usually a text value. I am planning a using multiple toggle buttons to hides rows that don't meet each criteria. I am kinda lost on how to begin any help and advice to get me through this would be greatly...
  16. L

    Several Toggle Buttons with same Macros

    Hi I have created a code for a Toggle button. However I need 50+ toggle buttons in the file with the same code. Please, see the code below. Private Sub ToggleButton1_Click() If ToggleButton1.Value = True Then ToggleButton1.Value. Caption = "Include" Range ("I5"). Value = 1 Else...
  17. F

    How to link Toggle Button name to Value in Excel Worksheet

    First time post... so be easy on me. I've entered a user form toggle button and now I need to link the name of this toggle button to a cell value within the worksheet the form will be placed. The cell value will change dependent on other slicers the user selects, so I need the toggle button...
  18. R

    Remove VBA loop on all worksheets.

    Can anyone help me with a simple problem. I don't know much about VBA but can tweak code I find online to do some applications. I want to use a toggle button to hide a range, but only do this on the worksheet that the toggle button is active on. The code I found on-line is for all worksheets...
  19. E

    Toggle button for hide/unhide columns

    Hi, I have a task for my student project in front of me that I need to do.. I have looked in all kind of forums but unfortunately I had no chance finding the solution for my problem.. Being a absolute beginner in Excel I need someone to help me. I use Excel 2010 and I need to do next task.. I...
  20. D

    Toggle Unhide rows but wants to prompt a password to use

    I want to be able show a prompt to add in the password before being able to do the actions below. Private SubToggleButton2_Click() If ToggleButton2Then ActiveSheet.UnprotectPassword ToggleButton2.ForeColor = RGB(0, 0, 0) ToggleButton2.Font.Bold = False ToggleButton2.Caption...

Watch MrExcel Video

This Week's Hot Topics

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top