Results 1 to 2 of 2

VBA togglebutton

Threaded View

  1. #1
    Registered User
    Join Date
    09-11-2014
    Location
    singapore
    MS-Off Ver
    2007
    Posts
    1

    VBA togglebutton

    Hi!
    I require help for this problem. I want to hide certain rows when user are not using the table and show when the button is depressed. I'm using the forms toggle button but I overlapped a few similar rows. The end result when I depress the top button, the bottom button keep showing. I want it to disappear. Can this be done? Is there other alternatives beside grouping? Thanks in advance
    Private Sub ToggleButton1_Click()
    If ToggleButton1.Value = True Then
    'This area contains the things you want to happen
    'when the toggle button is not depressed
    Sheet7.Rows("108:204").EntireRow.Hidden = False
    
    Else
    'This area contains the things you want to happen
    'when the toggle button is depressed
        Rows("108:204").EntireRow.Hidden = True
    
    End If
    End Sub
    
    Private Sub ToggleButton2_Click()
    If ToggleButton2.Value = True Then
    'This area contains the things you want to happen
    'when the toggle button is not depressed
    Sheet7.Rows("131:169").EntireRow.Hidden = False
    
    Else
    'This area contains the things you want to happen
    'when the toggle button is depressed
        Rows("131:169").EntireRow.Hidden = True
    
    End If
    End Sub
    
    Private Sub ToggleButton3_Click()
    If ToggleButton3.Value = True Then
    'This area contains the things you want to happen
    'when the toggle button is not depressed
    Sheet7.Rows("173:202").EntireRow.Hidden = False
    
    Else
    'This area contains the things you want to happen
    'when the toggle button is depressed
        Rows("173:202").EntireRow.Hidden = True
    
    End If
    End Sub
    Attached Files Attached Files
    Last edited by Leith Ross; 10-30-2014 at 09:49 PM. Reason: Added Code Tags

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. I can't use or modify a checkbox and a togglebutton
    By miganper in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2012, 09:24 AM
  2. Have Inputbox value overwritten by Togglebutton value
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-09-2010, 01:07 AM
  3. Togglebutton
    By thesandman in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 10-12-2009, 06:31 PM
  4. Setting ToggleButton Value
    By fazstp in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-01-2006, 12:31 AM
  5. [SOLVED] need help with togglebutton
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-09-2005, 12:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1