Hide a column in Excel via VBA code

How would I hide a column in Excel 97 using VBA?


Comments

  • : How would I hide a column in Excel 97 using VBA?

    :





    Sheets("SheetName").Visible = xlHidden



    If you want to prevent users from making it visible again...use xlVeryHidden. This makes the property only accessible through code.


  • : How would I hide a column in Excel 97 using VBA?

    :



    The other reply you got was to hide an entire sheet.



    Here's how I hide columns (this example hides column B)...



    Columns(2).ColumnWidth = 0


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories