View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PBcorn PBcorn is offline
external usenet poster
 
Posts: 79
Default error - select method failed - (columns.select)

Getting a 1004 error - select method of range class failed - with the
following code:

Sub unhide()

Dim sh As Object


For Each sh In ActiveWorkbook.Worksheets

sh.Visible = True

sh.Columns.Select

Selection.EntireColumn.Hidden = False

Next sh

End Sub

the code is in a module. The macro works for the first sheet of the
three-sheet workbook then bombs on the second sheet

Thanks in advance

PB