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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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