LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ken Ken is offline
external usenet poster
 
Posts: 207
Default hiding columns in grouped worksheets

I have an Excel 2003 workbook with 2 worksheets that I manipulate in
the grouped mode.

There is a row on one sheet named "Bid row". The user can put an x in
rows that he wants to have visible after a macro runs.

The macro selects that named range, unhides all the columns, then uses
SpecialCells(xlCellTypeBlanks) to select the blanks, then hides the
blank columns. It works fine when I follow the procedure manually and
have two worksheets grouped. The worksheet with the named range is
selected, but, the columns on both worksheets are kept in synch; that
is if there is a blank on sheet one, the column is hidden on both
sheet one and sheet 2.

However, when I automate this procedure the columns on the second
sheet are not hidden. The get selected, but they don't hide.

Can anyone see where I am doing something wrong in this code, or is
this a limitation in progrmatic manipulation of grouped worksheets.

Sub Format_View(R)
Sheets(Array("LOE Separate", "Quote")).Select
Sheets("Quote").Activate
Range(R).Select

Selection.EntireColumn.Hidden = False
Selection.SpecialCells(xlCellTypeBlanks).Select
Selection.EntireColumn.Hidden = True
End Sub

R is the name of the row that is used to control whether or not a
column remains visible. It appears to be selected on both grouped
sheets as desired, but, the columns are only hidden on the Quote
worksheet.


Thanks

Ken
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Same footer for worksheets (grouped) Jan Excel Programming 2 December 22nd 06 03:15 AM
hiding formulas with "Grouped' columns Patrick Excel Discussion (Misc queries) 1 October 31st 06 07:25 PM
hiding formulas with "Grouped' columns Patrick Excel Discussion (Misc queries) 0 October 31st 06 06:54 PM
Hiding Columns in Worksheets saved in CSV Format akkrug New Users to Excel 1 March 8th 06 02:22 PM
Protected worksheet, showing and hiding Grouped detail Colin_Bizfine Excel Discussion (Misc queries) 4 April 7th 05 03:44 AM


All times are GMT +1. The time now is 03:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"