+ Reply to Thread
Results 1 to 6 of 6

Toggle Button -Show Hide Column Range Fails

  1. #1
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Toggle Button -Show Hide Column Range Fails

    Hi folks,

    got stuck on this toggle button.

    I am trying to hide Column D, F, K I

    Please Login or Register  to view this content.

    how can i fix this - it does not work

    error
    Application.ActiveSheet.Columns(xAddress).Hidden = True

    many thanks

    sl

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Toggle Button -Show Hide Column Range Fails

    ActiveSheet.Range("D:D,F:F,I:I,K:K").EntireColumn.Hidden = True
    Ben Van Johnson

  3. #3
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Smile Re: Toggle Button -Show Hide Column Range Fails

    Yikes,

    no wonder I was going round and round

    thank you very much

    solved!


  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Toggle Button -Show Hide Column Range Fails

    using your original syntax

    change columns to range and add entirecolumn

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  5. #5
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Re: Toggle Button -Show Hide Column Range Fails

    How bizarre,

    i swear I tried something similar,

    oh well, well at least I have 2 solutions should the toggle button play up -he he

    thanks folks for your help


  6. #6
    Registered User
    Join Date
    01-24-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    60

    Re: Toggle Button -Show Hide Column Range Fails

    Actually,

    the .EntireColumn.Hidden did the trick, well done

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Use a Shape as a Toggle Button to Show and Hide a Worksheet
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-19-2015, 09:49 AM
  2. Show/Hide Rows & Columns Toggle Button
    By axegrynder in forum Excel General
    Replies: 2
    Last Post: 06-29-2015, 06:38 PM
  3. [SOLVED] Toggle Switch to hide/show column groups.
    By MLijoi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-22-2015, 02:57 PM
  4. [SOLVED] VBA Hide/Unhide row in work sheet if value in column H = "Y" w/ a toggle button
    By ywang in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2013, 01:02 AM
  5. [SOLVED] Hide Show Excel Toolbars using a Toggle Button
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-11-2012, 05:11 PM
  6. VBA hide row based on pull down with button to toggle show/hide
    By myronr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-12-2012, 06:07 PM
  7. Toggle Button to Hide column A while showing B and hide B while showing A
    By glee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2011, 02:02 PM

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