Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Method €˜CurrentPage of object €˜Pivot €˜Failed €œ

Hello,

I am migrating my excel macros from 2003 to 2007. The excel macro was
working fine with 2003. But now when I run a particular report, in 2007
sometimes I am getting the error like €œRun time Error 2157417848(80010108)
Method €˜CurrentPage of object €˜Pivot €˜Failed €œ
I dont know what the reason for this error is. Sometimes only am getting
this error and sometimes the macro is working very fine.


Private Sub RTS_Change()
Dim tempStr As String
tempStr = RTS.text
ColumnRTS = "J"

Application.ScreenUpdating = False

If (tempStr < "All") Then
Module1.PasteValuesInPricelistColumn tempStr, ColumnRTS
Sheets("History Report").Select
ActiveSheet.Unprotect
ActiveSheet.PivotTables("HistoryPivot").PivotField s("R T S").CurrentPage =
tempStr
Module1.pivotTableUpdate
Else
Sheets("History Report").Select
ActiveSheet.Unprotect
Module1.pivotTableUpdate
End If
End Sub


In the above code, in "RTS.text" RST is the name of the combobox Im using in
the report. I have removed the multiple use of "ActiveSheet." and gave the
sheet name directly itself, then also the same error. I have ran the report
for the same criteria, then again am getting error sometimes and sometimes
not. tempStr will always contain the value as "(All)". Please provide me help
on this issue, as am hangup with this for the past 1 month.
Thanks in advance.
-Austin
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
Method "Method 'Open' of object 'Workbooks' failed [email protected] Excel Programming 2 June 2nd 10 05:28 PM
Method Add of object Validation Failed - please help Shokie New Users to Excel 1 July 10th 09 01:34 PM
Method Add of object Validation Failed - please help Shokie Excel Worksheet Functions 1 July 10th 09 01:33 PM
Method Add of object Sheet failed JonMitsu Excel Programming 3 July 8th 06 08:34 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 03:59 AM.

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"