+ Reply to Thread
Results 1 to 3 of 3

Show / Hide Columns in multiple sheets

  1. #1
    Registered User
    Join Date
    06-24-2005
    Posts
    5

    Show / Hide Columns in multiple sheets

    Hi all.

    I am having a slight problem hiding and showing columns across multiple workbooks. I have created an array that selects multiple sheets and selects the required columns to hide. When I then try and hide them it only hides the columns on the visible sheet. I could manually select each and every sheet in the workbook and run it that way but it seems very inefficient when they are already selected. Does anyone know of a way around this problem?

    I am using Excel 2000 and this is basically the code I am using:
    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    01-23-2004
    Posts
    16

    Hide columns in multiple sheets

    Try something like

    Sheets("Consolidated").Activate
    Columns("D:S").Select
    Selection.EntireRow.Hidden = False

    Sheets("Fees Billed").Activate
    Columns("G:S").Select
    Selection.EntireRow.Hidden = False

    Sheets("Other Income").Activate
    Columns("G:S").Select
    Selection.EntireRow.Hidden = False

    and so on...


    Oz
    Oz

  3. #3
    Registered User
    Join Date
    06-24-2005
    Posts
    5
    Cheers Oz

    That will work but seems very inefficient when all the sheets are already selected. If I manually select hide columns with multiple sheets selected it hides them on all the sheets.

    If I then record that same action and play it back it only does the active sheet. I have approximately 20 workbooks each with different sheet names that this code has to be applied to so activating each sheet and then executing the code will be a very time consuming process to code and to execute.

    Surely their is a way to execute the code on all the sheets highlighted without having to activate each sheet in turn??

    Shad

+ Reply to Thread

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