I have created a GUI that will setup the pivot table.
For example, I click button1 it will run and setup the pivot table.
When I click button3, it will have a run time error 1004 because it does not have the value in the data. So is it possible to let VBA accept that error and show a prompt that that data is not available?

By the way, I’m using this
ActiveSheet.PivotTables("PivotTable1").PivotFields("Test").CurrentPage = "Data1"
to setup the pivot table.
There are 3 different variables; Data1, Data2, Data3. If Data3 is not available, it will show the error but I want to have a prompt to show that it is not available.. If you know how to do it, please share it with me! Thank you!
Yes. For that you need to do appropriate error handling. See this sample code.