toggle button

  1. K

    VBA only one toggle button pressed at the time in UserForm

    Hi all! I have an user form with 5 toggle buttons. Is there any easy and simple code to keep only one of the buttons on value = true? So if one button is toggled, then others are untoggled. UserForm name: EventRegist Toggle Buttons name are all different, but it is not a problem if I have...
  2. O

    Toggle button linked cell changes

    Hi Need help with toggle button linked cell text. the linked cell contains a date. i need the true, false, #na not to appear in the linked cell. when button state is turned to true linked cell should be solid black, solid red when in a false state and when in the #na state yellow, with the date...
  3. K

    VBA How to Dim Toggle Button to use it in multiple subs?

    Hi all! I have a toggle button in sheet Start (toggle button called EN). I need to refer to it in almost each macro I create so I wanted to declare it outside of subs. But my monkey way is not working and I cannot find a solution in google. I declared it in ThisWorkbook and used code Dim EN...
  4. K

    VBA All set value of all toggle buttons in sheet to False

    Hi all! I have a sheet with 15 toggle buttons. I also have command buttons and I am trying to switch off all toggle buttons if command button is pressed. Is any way to achieve it in any shorter way than repeating this line 15 times for each command button? Me.ToggleButton1.Value = False
  5. S

    Weird behavior of the toggle button

    Hello, So, I have a question if you have ever encountered this, if it's normal or how to solve this problem. I am new to macros, and for my project in work I have a table with information. However, this table is important for three different departments, and every department needs different...
  6. M

    2 toggle buttons..

    Hi to everyone! I created 2 custom toggle buttons with Office RibbonX Editor. So my question is hot to connect them - i mean when i toggle one button - other one should be untoggled. Here is some code from Office RibbonX Editor: <group id="customGroup4" label="Фільтрація за датою">...
  7. S

    Toggle Button caption dynamicly changed

    In my project I have activx toggle button. To this button I have this VBA code: Private Sub ToggleButton1_Click() Dim xAddress As String xAddress = "G" If ToggleButton1.Value Then Application.ActiveSheet.Columns(xAddress).Hidden = True ToggleButton1.Caption = "Pokaži...
  8. T

    VBA Toggle Button on Protected Sheet

    I am running this Macro to hide/unhide rows when form control button is clicked. Sub Important_Info_TOGGLE() Rows("24:42").EntireRow.Hidden = Not Rows("24:42").EntireRow.Hidden End Sub However when I protect the sheet it does not work. How can I fix this Macro so it runs when sheet is...
  9. 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...
  10. 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.
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

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
Back
Top