Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm running the code: ActiveSheet.PivotTables("PTMonthlyAnalystSalesSA") .PivotFields("SA").CurrentPage = ActiveSheet.Range("B1").Value However, occassionally the value in B1 does not exist in the Pivot Table field "SA" and I get a run time error. I'm not sure how to insert a basic error checking routine that inserts the value "(blank)" into the PivotField("SA") when an error occurs. Any advice would be much appreciated. Thanks, Ra |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I managed to work this out. For reference:
On Error resume next you input routine If Err then mydate = Listbox1.value on Error goto 0 RA "RestlessAde" wrote: Hi, I'm running the code: ActiveSheet.PivotTables("PTMonthlyAnalystSalesSA") .PivotFields("SA").CurrentPage = ActiveSheet.Range("B1").Value However, occassionally the value in B1 does not exist in the Pivot Table field "SA" and I get a run time error. I'm not sure how to insert a basic error checking routine that inserts the value "(blank)" into the PivotField("SA") when an error occurs. Any advice would be much appreciated. Thanks, Ra |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How can I remove multiple 'errors' in Excel error checking, at the same time??? | Excel Discussion (Misc queries) | |||
Excel Error Checking doesn't work on column ranges? | New Users to Excel | |||
Are Error-Checking rules (in Excel Options) workbook-specific? | Excel Discussion (Misc queries) | |||
Excel Visual Basic Error | Excel Discussion (Misc queries) | |||
Basic Error Checking in Excel VB | Excel Discussion (Misc queries) |