View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy[_2_] Patrick Molloy[_2_] is offline
external usenet poster
 
Posts: 1,298
Default Compile Error - Wrong number of arguements or invalid property ass

Sub AmendReport()

Sheets("Report").Range("B:AW").EntireColumn.Hidden = True

End Sub

"James T" wrote:

Created a very basic macro.

Spreadsheet has certain columns hidden and certain ones showing.

I just want the macro to hide all the columns I define (even if they are
already hidden or not)

However when I run it I get an error:

Compile Error - Wrong number of arguements or invalid property assignment.

It highlights the word "COLUMNS" in the debug.


Sub AmendReport()
'This macro unhides all columns and reopens the form for changes
Sheets("Report").Select
Columns("B:AW").Select
Selection.EntireColumn.Hidden = True
End Sub


Any thoughts?