ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   On Error Resume Next TROUBLE (https://www.excelbanter.com/excel-programming/293606-error-resume-next-trouble.html)

Walt Weber

On Error Resume Next TROUBLE
 
Hi to All,

I have an application that runs well on my Win98 / Excel
2002 setup, but fails on my WinXP / Excel 2002 setup using
the same file. The failure point is after an On Error
Resume Next line as follows:

On Error Resume Next
With pvtTable1.PivotFields("Absence")
.PivotItems("0").Visible = False <-- FAILS HERE
.PivotItems("").Visible = False
.PivotItems("(blank)").Visible = False
End With
On Error GoTo 0

The Error Message is:
Runtime Error 1004
Unable to get the PivotItems property of the PivotField
class.

It seems as though the On Error Resume Next is not
functioning on my WinXP / Excel 2002 setup. Yet I've
gone through Excel's Detect and Repair and I've confirmed
that I have the latest Office XP update from Microsoft's
web site on this machine.

Has anyone else observed this?

Best Regards,
Walt

Rob Bovey

On Error Resume Next TROUBLE
 
Hi Walt,

From the VBE menu, choose Tools/Options/General and make sure the Error
Trapping option is not set to Break on All Errors.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Walt Weber" wrote in message
...
Hi to All,

I have an application that runs well on my Win98 / Excel
2002 setup, but fails on my WinXP / Excel 2002 setup using
the same file. The failure point is after an On Error
Resume Next line as follows:

On Error Resume Next
With pvtTable1.PivotFields("Absence")
.PivotItems("0").Visible = False <-- FAILS HERE
.PivotItems("").Visible = False
.PivotItems("(blank)").Visible = False
End With
On Error GoTo 0

The Error Message is:
Runtime Error 1004
Unable to get the PivotItems property of the PivotField
class.

It seems as though the On Error Resume Next is not
functioning on my WinXP / Excel 2002 setup. Yet I've
gone through Excel's Detect and Repair and I've confirmed
that I have the latest Office XP update from Microsoft's
web site on this machine.

Has anyone else observed this?

Best Regards,
Walt




Walt Weber

On Error Resume Next TROUBLE
 
Hi Rob,

Thank you. That was it! I must have done it, but it
must have been during a senior moment - I sure can't
remember doing so.

Best Regards,
Walt

-----Original Message-----
Hi Walt,

From the VBE menu, choose Tools/Options/General and

make sure the Error
Trapping option is not set to Break on All Errors.

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Walt Weber" wrote in message
...
Hi to All,

I have an application that runs well on my Win98 / Excel
2002 setup, but fails on my WinXP / Excel 2002 setup

using
the same file. The failure point is after an On Error
Resume Next line as follows:

On Error Resume Next
With pvtTable1.PivotFields("Absence")
.PivotItems("0").Visible = False <-- FAILS HERE
.PivotItems("").Visible = False
.PivotItems("(blank)").Visible = False
End With
On Error GoTo 0

The Error Message is:
Runtime Error 1004
Unable to get the PivotItems property of the PivotField
class.

It seems as though the On Error Resume Next is not
functioning on my WinXP / Excel 2002 setup. Yet I've
gone through Excel's Detect and Repair and I've

confirmed
that I have the latest Office XP update from Microsoft's
web site on this machine.

Has anyone else observed this?

Best Regards,
Walt



.



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com