+ Reply to Thread
Results 1 to 6 of 6

Different ranges for hide/unhide with vba code

  1. #1
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Different ranges for hide/unhide with vba code

    Hi, please if anyone can help me. in a sheet I use a code to hide/ unhide two columns G:H. I want to hide unhide another one column S. I try but it hides all columns from G until S.
    I use the code below,
    Please Login or Register  to view this content.
    how can I write the second range?
    And before if I want to unprotected the sheet with password and after if to protect again. Thanks.
    Last edited by Immortal2014; 12-21-2015 at 05:53 AM.

  2. #2
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Different ranges for hide/unhide with vba code

    Try this..

    Code is untested -

    Please Login or Register  to view this content.
    Cheers!
    Deep Dave

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Different ranges for hide/unhide with vba code

    @needforexcel

    You correctly reported this post for missing code tags but then continued to respond to the question rather than mention it to the OP and ask them to change their original before responding further.

    Please note next time.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Forum Expert NeedForExcel's Avatar
    Join Date
    03-16-2013
    Location
    Pune, India
    MS-Off Ver
    Excel 2016:2019, MS 365
    Posts
    3,873

    Re: Different ranges for hide/unhide with vba code

    Point noted!

    Sorry for the violation..

    While posting, I just missed the point that code tags were missing even though I'd reported it myself..

  5. #5
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Different ranges for hide/unhide with vba code

    Thanks for your help, I edit the first post. Sorry for this. Can you tell me if you know for unprotect/protect?

  6. #6
    Forum Contributor
    Join Date
    09-18-2014
    Location
    Χαμένος στο διάστημα
    MS-Off Ver
    2016
    Posts
    383

    Re: Different ranges for hide/unhide with vba code

    OK I find it.

+ 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. VBA code to hide/unhide worksheets
    By holli in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-26-2015, 11:34 AM
  2. Need to Hide/Unhide Rows and Columns Based on Several Date Ranges
    By zlorinc in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-20-2014, 04:32 PM
  3. Help with VBA Code (Hide/Unhide Worksheets)
    By maryren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2014, 12:43 PM
  4. [SOLVED] Hide Unhide Code
    By ando185 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-17-2013, 01:22 PM
  5. Code to Hide and Unhide Rows
    By jcoulter in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-13-2012, 10:38 AM
  6. Hide/Unhide Rows VBA code Changes Help
    By Justinmih in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 05-12-2011, 04:24 PM
  7. Code to Hide/Unhide CommandButtons
    By SSN651 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-22-2008, 11:55 AM

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