Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
If you are using SAS Add-in for Microsoft Office (AMO), there are a couple custom tasks (written by Chris Hemedinger) that will allow you to simply submit code from AMO. Here is one:
http://support.sas.com/documentation/onlinedoc/guide/customtasks/samples/SASProgramRunnerExample.zip
UPDATE: Starting in AMO 7.13 release, you can create and run SAS programs in SAS Add-in for Microsoft Office.
If you don't have AMO, it's a little more involved, but you can submit code via VBA using the LanguageService. I can send sample code (as-is) if desired.
Casey
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
Register today and join us virtually on June 16!
sasglobalforum.com | #SASGF
View now: on-demand content for SAS users
I get this error: "Argument not optional". Do you known why?
Hi,
Welcome to the forum. A quick internet search on your error message provided the following link:
Argument not optional (Visual Basic)
Sounds like an argument is missing, possibly.
It is good practice to start a new question when you need something answering, as mentioned in
If you need more information then you'll need to supply more information, e.g. the relevant part of your program, which would be good to do in a new question, as already mentioned.
If the error is occurring in VB then it might be worth trying to post your question to a VB forum, if you haven't already or if you can't get an answer here.
Regards,
Amir.
Thank you very much. The code works and opens a whole new domain of possibilities.
I have one problem, though:
How to get a macro variable's value into the VBA? My code needs to decide what task to run next based on the SAS' result, and the task might be performed outside the SAS ecosystem (in Oracle or R for instance).
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!