Consulting

Results 1 to 3 of 3

Thread: Unhide column without selecting sheet

  1. #1
    VBAX Tutor
    Joined
    Jul 2010
    Posts
    225
    Location

    Unhide column without selecting sheet

    Is there anyway to unhide a column without selecting it first? I don't want to move away from the sheet I'm on when it does it..

    [VBA]Sub UnHide_Private_Email()
    Call UnProtectAll
    Sheets("1 MAINT").Select
    Columns("p").Select
    Selection.EntireColumn.Hidden = False
    Call ProtectAll
    End Sub
    [/VBA]

    Thanks again guys.

    Mike.

  2. #2
    VBAX Mentor
    Joined
    Jun 2004
    Posts
    363
    Location
    This
    [vba]
    Sheets("1 MAINT").Select
    Columns("p").Select
    Selection.EntireColumn.Hidden = False [/vba]
    can be changed to
    [VBA]Sheets("1 MAINT").Columns("p").EntireColumn.Hidden = False[/VBA]

  3. #3
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    Try the following
    [vba]With Sheets("1 Maint").Columns("P")
    .EntireColumn.Hidden = False[/vba]
    rather than using the Select option
    Last edited by Aussiebear; 04-26-2011 at 07:33 PM. Reason: ....way too slow!
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •