Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
For Each statement
The following code only hides the columns for the first sheet even though all sheets in the array aSheets are selected. Do I need to activate each sheet to get it to work? If so how would I code the For Each statement. Any help is appreciated. Many thanks Jacqui ThisWorkbook.Sheets(aSheets).Select Range("A1").Select iCCount = ActiveSheet.Range("IV7").End (xlToLeft).Column For i = 2 To iCCount Selection.Offset(0, i).EntireColumn.Hidden = False Next |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Answered my own question
I've resolved this! But it there any news on my earlier post, regarding the calculation of minus working days for a timetable. -----Original Message----- The following code only hides the columns for the first sheet even though all sheets in the array aSheets are selected. Do I need to activate each sheet to get it to work? If so how would I code the For Each statement. Any help is appreciated. Many thanks Jacqui ThisWorkbook.Sheets(aSheets).Select Range("A1").Select iCCount = ActiveSheet.Range("IV7").End (xlToLeft).Column For i = 2 To iCCount Selection.Offset(0, i).EntireColumn.Hidden = False Next . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
IF statement inside a SUMIF statement.... or alternative method | Excel Worksheet Functions | |||
Reconcile Bank statement & Credit card statement & accounting data | Excel Worksheet Functions | |||
Embedding an OR statement in an IF statement efficiently | Excel Discussion (Misc queries) | |||
Sum if statement with a left statement | Excel Discussion (Misc queries) | |||
appending and IF statement to an existing IF statement | Excel Worksheet Functions |