+ Reply to Thread
Results 1 to 5 of 5

Issue with Hiding Columns

  1. #1
    Forum Contributor
    Join Date
    07-12-2005
    Posts
    143

    Issue with Hiding Columns

    Hi all,

    I'm having an issue with hiding columns. I have a worksheet with a statement summary at the top and on row 20 filters to select customer invoices.

    Now, i set a macro to hide rows 1-19 and certain columns - say B, D, & F. Hiding manually by highlightling and selecting hide works, but when i replay back the macro it hides columns A-C, for example. I have no idea why it does this and i experimented with using column widths at 0 instead, but with the same result.

    I would post the code, but i don't have it right now (it's v.simple). In the meantime if anyone has come across this problem before and knows how to solve it i would be very very happy.

    Thanks as always,

    Chris

  2. #2
    Valued Forum Contributor
    Join Date
    04-11-2006
    Posts
    407
    Sub Test()
    Range("1:19").EntireRow.Hidden = True
    Range("B:B").EntireColumn.Hidden = True
    Range("D:D").EntireColumn.Hidden = True
    Range("F:F").EntireColumn.Hidden = True
    End Sub

    This will hide rows 1-19 and columns B,D, & F...

  3. #3
    Rick Hansen
    Guest

    Re: Issue with Hiding Columns

    Hey Chris Try this,

    Sub test()
    Range("1:19").EntireRow.Hidden = True
    Range("B:B,D:D,F:F").EntireColumn.Hidden = True
    End Sub

    enjoy , Rick

    "chris100" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi all,
    >
    > I'm having an issue with hiding columns. I have a worksheet with a
    > statement summary at the top and on row 20 filters to select customer
    > invoices.
    >
    > Now, i set a macro to hide rows 1-19 and certain columns - say B, D, &
    > F. Hiding manually by highlightling and selecting hide works, but when
    > i replay back the macro it hides columns A-C, for example. I have no
    > idea why it does this and i experimented with using column widths at 0
    > instead, but with the same result.
    >
    > I would post the code, but i don't have it right now (it's v.simple).
    > In the meantime if anyone has come across this problem before and knows
    > how to solve it i would be very very happy.
    >
    > Thanks as always,
    >
    > Chris
    >
    >
    > --
    > chris100
    > ------------------------------------------------------------------------
    > chris100's Profile:

    http://www.excelforum.com/member.php...o&userid=25166
    > View this thread: http://www.excelforum.com/showthread...hreadid=536574
    >




  4. #4
    Forum Contributor
    Join Date
    07-12-2005
    Posts
    143
    Thanks guys,

    That looks familar to what i've tried. I'll give it a go and let you know. THanks for posting.

    Chris

  5. #5
    Forum Contributor
    Join Date
    07-12-2005
    Posts
    143
    Works a charm thanks guys.

    What i had done was use range.select then hide column. For some reason it didn't like this.

    THanks again,

    Chris

+ 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