Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi all. I am having a slight problem hiding and showing columns across multiple workbooks. I have created an array that selects multiple sheets and selects the required columns to hide. When I then try and hide them it only hides the columns on the visible sheet. I could manually select each and every sheet in the workbook and run it that way but it seems very inefficient when they are already selected. Does anyone know of a way around this problem? I am using Excel 2000 and this is basically the code I am using: Code: -------------------- Sub MonthFormatter() Dim strCurrMnth strCurrMnth = Range("A1").Value Sheets(Array("Consolidated", "Fees Billed", "Other Income", "Bad Debt & Disbs WO", _ "Partner Charges", "Fee Earner Related Costs", "Support Charges", "Travel", _ "Fee Earner Payroll", "Support Associated Costs", "Partner Costs", "Training", _ "Marketing", "Other Costs")).Select Columns("D:S").Select Selection.EntireColumn.Hidden = False Select Case strCurrMnth Case "Show All" Columns("D:S").Select Selection.EntireColumn.Hidden = False Range("B1").Select Case "May" Columns("G:S").Select Selection.EntireColumn.Hidden = True Range("B1").Select Case "June" Columns("G:S").Select Selection.EntireColumn.Hidden = True Range("B1").Select End Select Sheets("Consolidated").Select Range("B1").Select End Sub -------------------- -- Shadster ------------------------------------------------------------------------ Shadster's Profile: http://www.excelforum.com/member.php...o&userid=24610 View this thread: http://www.excelforum.com/showthread...hreadid=381964 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is there a quick way to show selected columns (not using hide) | Excel Discussion (Misc queries) | |||
how can hide and show columns using macro? | Excel Worksheet Functions | |||
Show/Hide Columns | Excel Programming | |||
Hide/show sheets by first part of sheet name | Excel Programming | |||
Show Form, Hide all Sheets | Excel Programming |