How do I open SAS and send my worksheet from Excel to SAS by clicking a button (created by macro) in Excel using VBA?
I have this so far, but not sure if it has started correct or how to proceed.
If anyone has advice or has done it, sharing the VBA code would be most appreciated!
Sub New_Program()
Set SAS = CreateObject("SAS.Application")
SAS.Visible = True
SAS.Wait = True
End Sub
A few years ago I did a Global Forum paper on running SAS from Excel through VBA and ADO.You can find the paper at this link
I think pages 8-11 might be more or less the code you need - it turns a spreadsheet range into a SAS data set but you should be able to adapt it to suit your purposes.
A few years ago I did a Global Forum paper on running SAS from Excel through VBA and ADO.You can find the paper at this link
I think pages 8-11 might be more or less the code you need - it turns a spreadsheet range into a SAS data set but you should be able to adapt it to suit your purposes.
Seems to be a problem best solved by using SAS Addin for MS Office.
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.