Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Error 1004 update autofilter and pivottable

Hello,

I have made a VBA program to update a two pivot tables and two
autofilters in excel 2000, no problems. But in excel 97 give the
program a error 1004. The first autofilter gives no problems. But the
second autofilter give a error like "Autofilter method of Range Class
Failed" or excel gives a failed error and quits. Can somebody help me
out?

gr.
Fons Heuven




Private Sub CommandButton1_Click()
Application.ScreenUpdating = False
Sheets("Tabel E").Select
Selection.AutoFilter Field:=1, Criteria1:="<0", Operator:=xlAnd,
Criteria2:="<"

Sheets("Tabel E2").Select

Application.DisplayAlerts = False
ActiveSheet.PivotTables("Draaitabel2").RefreshTab le
Application.DisplayAlerts = True
CommandButton1.TakeFocusOnClick = False
ActiveCell.Activate
Sheets("tabel E2").Range("a14").Select

--Selection.AutoFilter Field:=1, Criteria1:="<0", Operator:=xlAnd,
Criteria2:="<"


Sheets("Tabel tot").Select
ActiveSheet.PivotTables("Draaitabel3").RefreshTab le
Application.ScreenUpdating = True
Sheets("Hoofdmenu").Select
End Sub

Reply
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
VBA AutoFilter of a PivotTable jxbeeman Excel Discussion (Misc queries) 1 July 22nd 09 02:57 PM
error 1004 when setting pivottable.pagefields Amedee Van Gasse Excel Discussion (Misc queries) 0 September 24th 08 01:39 PM
Macro runtime error 1004 with Autofilter Lorna B Excel Discussion (Misc queries) 3 May 25th 07 08:38 PM
PivotTable - PivotTable Field name is not valid - error! miker1999[_17_] Excel Programming 1 June 10th 04 10:30 AM
Runtime Error '1004' - AddFields method of PivotTable class failed MikeC[_3_] Excel Programming 1 May 21st 04 06:58 AM


All times are GMT +1. The time now is 07:29 PM.

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

About Us

"It's about Microsoft Excel"