BookmarkSubscribeRSS Feed
sustagens
Pyrite | Level 9

Is there a way to catch SP errors in VBA?

 

This portion of the VBA code brings in the Stored Process. I thought adding "On Error GoTo ErrMsg" prior to inserting the STP would work.

Dim stp_run_all As SASStoredProcess 'Bring in "Run all" STP

'On Error GoTo ErrMsg
Set stp_run_all = sas.InsertStoredProcess("/Drive/TOOL/SP_Dly_DandL_Run_all_AMO", Runner.Sheets("Run").Range("L6"), , outputParams, inputStreams)

I need to be able to catch when the STP errors, and then perform some things when it does (message box saying there was an error, delete some sheets, delete the STP from the file).

 

Any help appreciated!

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Discussion stats
  • 0 replies
  • 527 views
  • 0 likes
  • 1 in conversation