Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Please help.
I have this Macro. But the problem starts when there is no data in the pivot table or no data in the data source. It will prompt a run time error 1004. Private Sub Worksheet_Activate() Me.PivotTables(1).PivotCache.Refresh Range("C1").Activate End Sub I believe there is a way to exit this sub if running this sub causes an error. Thanks. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Private Sub Worksheet_Activate()
On Error Resume Next Me.PivotTables(1).PivotCache.Refresh Range("C1").Activate End Sub -- If this post helps click Yes --------------- Jacob Skaria " wrote: Please help. I have this Macro. But the problem starts when there is no data in the pivot table or no data in the data source. It will prompt a run time error 1004. Private Sub Worksheet_Activate() Me.PivotTables(1).PivotCache.Refresh Range("C1").Activate End Sub I believe there is a way to exit this sub if running this sub causes an error. Thanks. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks... it works.
"Jacob Skaria" wrote: Private Sub Worksheet_Activate() On Error Resume Next Me.PivotTables(1).PivotCache.Refresh Range("C1").Activate End Sub -- If this post helps click Yes --------------- Jacob Skaria " wrote: Please help. I have this Macro. But the problem starts when there is no data in the pivot table or no data in the data source. It will prompt a run time error 1004. Private Sub Worksheet_Activate() Me.PivotTables(1).PivotCache.Refresh Range("C1").Activate End Sub I believe there is a way to exit this sub if running this sub causes an error. Thanks. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error Handling | Excel Discussion (Misc queries) | |||
Error Handling for xlCellTypeFormulas | Excel Worksheet Functions | |||
Just create it regardless with error handling | Excel Discussion (Misc queries) | |||
Handling #NUM! error | Excel Worksheet Functions | |||
Error handling in macro | Excel Discussion (Misc queries) |