+ Reply to Thread
Results 1 to 6 of 6

VBA for Hide and Unhide specific columns for multiple worksheets by using one command butt

  1. #1
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    848

    VBA for Hide and Unhide specific columns for multiple worksheets by using one command butt

    Dear Experts,

    I am looking for the VBA to Hide and Unhide specific columns for multiple worksheets in a workbook by using one command button and command button requires the passcode to process the command and after Hiding the specific columns those should be Unhide only by using the command button with required passcode.

    Request to you kindly do help me out.

    Many thanks and kind regards,

    Neilesh

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: VBA for Hide and Unhide specific columns for multiple worksheets by using one command

    Hi Neilesh,

    If you record a macro that does what you want, you can see the VBA that does those steps. I turned on the "Record Macro" and hid some columns. Here is the code that was produced and is some of the VBA you require.
    Please Login or Register  to view this content.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    848

    Re: VBA for Hide and Unhide specific columns for multiple worksheets by using one command

    Dear Expert, thank you so much for the precious support. Is it possible to include multiple worksheets in the VBA code by using a command button that requires passcode for processing.

    Many thanks and kind regards,

    Neilesh

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: VBA for Hide and Unhide specific columns for multiple worksheets by using one command

    Hi Neilesh,

    I believe the above code will work on the worksheet that is active (the one you are looking at).

    Is the link below what you want? It does a Password Protect on sheets.

    https://exceloffthegrid.com/vba-code...ct-excel-file/

    To be more specific with your request, we should have a sample workbook from you that shows what you have and what you want to achieve.

  5. #5
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,162

    Re: VBA for Hide and Unhide specific columns for multiple worksheets by using one command

    How about something like this
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor Neilesh Kumar's Avatar
    Join Date
    05-26-2016
    Location
    INDIA
    MS-Off Ver
    2013 & 2016
    Posts
    848

    Re: VBA for Hide and Unhide specific columns for multiple worksheets by using one command

    Dear Expert, Marvin P thank you so much i got with the provided link exactly what i was looking for. Thank you so much once again.

    Thank you so much Fluff13 for your precious support and valuable contribution. Many thanks and kind regards,

    Neilesh

+ 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 to group and hide/unhide columns in several Excel worksheets
    By Kerbs1011 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-11-2016, 06:02 AM
  2. [SOLVED] PW Protected Macros Needed to 1) Hide Certain Worksheets & 2) Unhide Worksheets & Columns
    By Aimee S. in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-21-2014, 10:49 AM
  3. [SOLVED] Hide/Unhide columns in multiple worksheets based on item chosen in a drop down list.
    By Gattaca2014 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 02-27-2014, 01:31 PM
  4. How to Hide/Unhide Command Buttons along with Columns
    By EddieN1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2013, 09:53 AM
  5. Using command button to hide/unhide worksheets
    By Sly1980 in forum Excel General
    Replies: 1
    Last Post: 05-31-2012, 03:44 PM
  6. Need macro to check values and hide/unhide specific worksheets
    By amsnss in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-29-2011, 01:53 PM
  7. Hide/Unhide Command Button based on multiple cell values
    By dagindi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2011, 09:03 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