LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
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
 
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
Excel VBA error - Select method of Range class failed R Ormerod Excel Programming 0 July 12th 07 09:02 PM
Run-Time error '1004' : Select method of Range class failed [email protected] Excel Discussion (Misc queries) 3 March 9th 07 01:36 PM
Error: method 'select' of object_worksheet' failed Carl Excel Discussion (Misc queries) 4 September 9th 06 08:52 PM
RT Error 1004, Select method of worksheet class failed Dana Sherbondy Excel Programming 2 October 1st 04 03:55 PM
error 1004 Select method of Range class failed J.E. McGimpsey Excel Programming 1 September 12th 03 07:42 PM


All times are GMT +1. The time now is 04:43 AM.

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

About Us

"It's about Microsoft Excel"