Macro to hide details of groupings

L

Lily

Hi, I'm recording a macro trying to eliminate tedious work to hide details of a couple of groupings (both columns and rows

Sub format(

' format Macr
' Macro recorded 4/12/2004

Range("A1").Selec
Columns("AE:AG").Selec
Range("AE1").Activat
ExecuteExcel4Macro "SHOW.DETAIL(2,33,FALSE,,30)
Columns("A:I").Selec
Range("I1").Activat
ExecuteExcel4Macro "SHOW.DETAIL(2,9,FALSE,,0)
Rows("1:456").Selec
ExecuteExcel4Macro "SHOW.DETAIL(1,455,FALSE,,0)
Range("I465").Selec
End Su

When I tried to run the macro on another sheet. I got the error message as follows asking me to debug

Run time error 100

You have entered too many arguments for this function

Could anyone help me on this problem

Thanks a lot

Regards, Lily
 
B

Bob Phillips

Looking at the MacroFun.Hlp, it would appear that you have introduced a
parameter.

Try

Sub format()
Range("A1").Select
Columns("AE:AG").Select
Range("AE1").Activate
ExecuteExcel4Macro "SHOW.DETAIL(2,33,FALSE,30)"
Columns("A:I").Select
Range("I1").Activate
ExecuteExcel4Macro "SHOW.DETAIL(2,9,FALSE,0)"
Rows("1:456").Select
ExecuteExcel4Macro "SHOW.DETAIL(1,455,FALSE,0)"
Range("I465").Select
End Sub

and nshow_filed is described as

Show_Field is a string specifying the name of the field to add to a
PivotTable, if the selection is inside a PivotTable. The new field is added
as the new innermost field. Available for only innermost row or column
fields.

where you have 30, 0 and 0

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

Lily said:
Hi, I'm recording a macro trying to eliminate tedious work to hide details
of a couple of groupings (both columns and rows.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top