Pivot Table in a Macro version 2000


Posted by TL on December 26, 2000 11:13 AM

I am tring to create a pivot table in a macro in version 2000 of Excel. I keep getting a run time error message in selecting the range. The workbook I am trying to pull is partially an extract into excel, renamed into a different file and with columns added. When I try to run the pivot table, Excel 2000 wants to use the original data from the extract instead of the second sheet of columns created from the first sheet in the same workbook. Has anyone had a similar experience?



Posted by Dave on December 26, 2000 2:05 PM


Hi TL


Have you tried creating a named range from your copied data ? Something like:

Dim MyRange As String

MyRange = "Sheet1!" & Sheet1.UsedRange.Address

ActiveWorkbook.Names.Add Name:="NewRange", RefersTo:= _
"=" & MyRange


Dave


OzGrid Business Applications