+ Reply to Thread
Results 1 to 4 of 4

Hide columns through vba

  1. #1
    Registered User
    Join Date
    01-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    13

    Hide columns through vba

    Hi All

    I am trying to a hide entire Column B in sheet 2

    User enters to values in sheet 1 in various (A1:A20) rows . where as COLUMN B in sheet 2 has some functions like addition, concatenate, if and give a values
    after data is entered in sheet 1. column A (a1:a20) in sheet 2 is just a description

    I dont want users have to access to column B in sheet 2.

    I have created a command button where it takes only the values from COLUMN B and copies them in COLUMN C.

    So the only thing i need to do this is when user enters SHEET 2 the user should see only columns A and C.

    Can we hide column B through VBA Code and how to unhide the column whenever the workbook creator wants to make some changes in column B in sheet 2
    Can we put in password or go and change the code so that column B is visible.

    Thanx for your help in advance

    Chakri.
    Last edited by grk_chakri; 01-26-2012 at 01:39 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Hide columns through vba

    Simpler than using VBA would be to use Worksheet protection after Locking & Hiding the cells in Column B
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    01-04-2012
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: Hide columns through vba

    Quote Originally Posted by royUK View Post
    Simpler than using VBA would be to use Worksheet protection after Locking & Hiding the cells in Column B
    Thanx a ton roy, i thought for a while i cant do with that option. but i have looked at all options correctly now and able to get the desired results

    thnx once again

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Hide columns through vba

    Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.


    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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