Results 1 to 6 of 6

Thread: Need help with VBA code for hiding across multiple ranges

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Knowledge Base Approver VBAX Wizard p45cal's Avatar
    Joined
    Oct 2005
    Location
    Surrey UK
    Posts
    5,970
    Quote Originally Posted by nbooth
    D3 on the Assumptions tab
    …which has a formula in?, or you enter these values in manually?

    ps. you macro could probably be shortened to:
    [vba]Sub blah()
    Columns("AD:BC").EntireColumn.Hidden = True
    Sheets("Utility Comparison").Rows("1:9").EntireRow.Hidden = True
    Sheets("Income Statement & Tax").Rows("1:13").EntireRow.Hidden = True
    Sheets("Tax Rate Chart").Visible = False
    Sheets("Depreciation").Rows("2:16").EntireRow.Hidden = True
    Sheets("Construction").Rows("2:9").EntireRow.Hidden = True
    With Sheets("Debt")
    .Columns("U:AH").EntireColumn.Hidden = True
    .Rows("1:13").EntireRow.Hidden = True
    End With
    Sheets("Cap&IRRs").Visible = False
    End Sub
    [/vba]although the first line, to be robust, should be qualified with the sheet it works on (like all the other lines do) right now it acts on whichever sheet happens to be the active sheet.
    Last edited by p45cal; 01-27-2012 at 04:04 PM.
    p45cal
    Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.

Posting Permissions

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