Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Basic Error Checking in Excel VB

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Basic Error Checking in Excel VB

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
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
How can I remove multiple 'errors' in Excel error checking, at the same time??? [email protected] Excel Discussion (Misc queries) 2 May 11th 23 11:42 AM
Excel Error Checking doesn't work on column ranges? genegal New Users to Excel 1 January 25th 10 05:19 AM
Are Error-Checking rules (in Excel Options) workbook-specific? JoeM Excel Discussion (Misc queries) 7 May 4th 08 01:30 AM
Excel Visual Basic Error cmar Excel Discussion (Misc queries) 2 June 10th 06 12:13 AM
Basic Error Checking in Excel VB RestlessAde Excel Discussion (Misc queries) 1 August 5th 05 08:31 AM


All times are GMT +1. The time now is 10:19 AM.

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

About Us

"It's about Microsoft Excel"