+ Reply to Thread
Results 1 to 5 of 5

Click a shape to unhide and hide columns

  1. #1
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Click a shape to unhide and hide columns

    Hi,
    I want to unprotect a worksheet with password, then unhide columns.
    Click a shape again to hide columns and reset password.

    This code gives an error.
    HTML Code: 
    Last edited by Rocky2013; 10-29-2018 at 10:19 AM.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Click a shape to unhide and hide columns

    You haven't set the ws object to anything.

    If you're only dealing with the activesheet, then you don't need the ws variable at all:

    Please Login or Register  to view this content.
    Last edited by Olly; 10-29-2018 at 10:17 AM.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,268
    Quote Originally Posted by Rocky2013 View Post
    Hi,
    I want to unprotect a worksheet with password, then unhide columns.
    Click a shape again to hide columns and reset password.

    This code gives an error.
    HTML Code: 
    Please Login or Register  to view this content.
    Last edited by daboho; 10-29-2018 at 10:49 AM.

  4. #4
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Click a shape to unhide and hide columns

    Quote Originally Posted by Olly View Post
    You haven't set the ws object to anything.

    If you're only dealing with the activesheet, then you don't need the ws variable at all:

    Please Login or Register  to view this content.
    The code works. And I deleted "Dim ws As Worksheet"

    Thanks

  5. #5
    Forum Contributor
    Join Date
    10-03-2012
    Location
    USA
    MS-Off Ver
    2010
    Posts
    496

    Re: Click a shape to unhide and hide columns

    Quote Originally Posted by daboho View Post
    Please Login or Register  to view this content.
    For some reason, "400" error pop-up.

+ 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. [SOLVED] Hide unhide a row with one click
    By SHELTONUNDERDOG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2015, 04:45 PM
  2. [SOLVED] How to hide and unhide rows from a click in the cell.
    By uscayan in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-05-2015, 08:28 AM
  3. [SOLVED] Using VBA to Hide and Unhide Columns with Click of Button
    By shiva_reshs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2014, 03:29 PM
  4. Double click to hide/unhide rows
    By Lilleyj in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-15-2014, 10:55 AM
  5. [SOLVED] Hide And Unhide Column With One Button,,,,Once Click Hide,,,,,Again Click Unhide
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 07:58 AM
  6. [SOLVED] need to hide / unhide cells with single click
    By SBURTON in forum Excel General
    Replies: 2
    Last Post: 09-25-2012, 03:00 PM
  7. click - hide/unhide column
    By sqoo in forum Excel General
    Replies: 7
    Last Post: 11-28-2011, 04:48 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