+ Reply to Thread
Results 1 to 3 of 3

Thread: Prob hiding columns in VBA

  1. #1
    Registered User
    Join Date
    10-02-2008
    Location
    Kensington, CA
    Posts
    26

    Prob hiding columns in VBA

    Rng = "H:P"
    With SHEET
    Columns(Rng).Select
    Selection.EntireColumn.Hidden = True
    End With

    This seems to hide Columns 2 to 16 (B to P) instead of H to P.

    I've also tried it without the "With" code
    SHEET.Columns.Select
    with the same result.

    Any ideas what's going on? Thanks so much for you help.
    Mac

  2. #2
    Forum Guru pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2010
    Posts
    5,155

    Re: Prob hiding columns in VBA

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here
    regards pike

    If the solution helped please donate
    here to the RSPCA

    Sites worth visiting;

    J&R Solutions - royUK

    AJP Excel Information - Andy Pope

    Spreadsheet Toolbox

    VBA for smarties - snb

  3. #3
    Forum Guru, retired Admin royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    25,640

    Re: Prob hiding columns in VBA

    Also don't use abbreviations like "prob" in the Thread Title
    Hope that helps.

    RoyUK
    --------
    If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need

    For Excel Tips & Solutions, free examples and tutorials why not check out my downloads

    New members please read & follow the Forum Rules

    Remember to mark your questions Solved and rate the answer(s)

+ 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.2.0