Error Proofing

J

Jasper

Goodmorning Everybody,

My question is:

"When I want a pivot field to change into the value I set on K I use:

ActiveSheet.PivotTables("PivotTable3").PivotFields("ARF Code").CurrentPage =
"" & k & ""

However it can and will happen that the value set on k does not exist in the
pivot field. When this occurs I want the macro to use the following code:

ActiveSheet.PivotTables("PivotTable3").PivotFields("ARF Code").CurrentPage =
"(blank)"

How can I write such a thing down? Thanks in Advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top