Results 1 to 6 of 6

VB Code to Hide Columns

Threaded View

  1. #1
    Registered User
    Join Date
    07-29-2011
    Location
    South Africa
    MS-Off Ver
    Excel 2003
    Posts
    3

    VB Code to Hide Columns

    Hi there,

    I am very new to VB coding in Excel so would really appreciate your expertise on this

    I have a spreadsheet where I am hiding certain columns (all on the same worksheet) when a checkbox is ticked, I managed to get it working where there are consecutive columns using the below code:

    Private Sub DomainRequestorColumns_Click()

    If Range("C:S").EntireColumn.Hidden = True Then
    Range("C:S").EntireColumn.Hidden = False
    Else
    Range("C:S").EntireColumn.Hidden = True
    End If

    End Sub

    This works perfectly but I need to add a column AU and I can't for the life of me figure out how to do this?

    Can you perhaps advise me on how I can do this please?

    Thanks in advance,
    Angela
    Last edited by Angel007; 08-17-2011 at 07:40 AM.

Thread Information

Users Browsing this Thread

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

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