BookmarkSubscribeRSS Feed
pp2014
Fluorite | Level 6

I have following code which I have been running for couple months in my daily job. But since yesterday it stopped working. It opens the excel file and then it does not do anything (not running the VBA macro at all). Below is my code. Please let me know if any settings need to be changed...

 

Below is my code:

 

%let macDrv=c:\Temp\Reports;

%let macBook=Macro_Format_Scorecard.xlsm;

%let macName=FormatAllReports;

 

filename exl dde 'excel|system';

options noxwait noxsync;

x "'C:\Program Files\Microsoft Office\Office15\EXCEL.EXE' &macDrv.\&macBook";

data _NULL_;

x=sleep(5);

run;

 

data _null_;

file exl;

put '[RUN("'"&macBook"'!'"&macName"'",FALSE)]';

put '[ERROR(FALSE)]';

put '[SAVE()]';

put '[CLOSE()]';

run;

 

data _null_;

file exl;

put '[QUIT()]';

run;

5 REPLIES 5
Reeza
Super User

If it stopped working and worked before it's likely not the code. 

 

Verify that nothing else has changed, permissions, SAS settings, security settings, version of Excel, and path of file. 

pp2014
Fluorite | Level 6

Thanks Reeza.

 

If I run VBA macro, then it works. It formats the Report. But when I let SAS run the Same Madcro, it does not work..  

Reeza
Super User

SAS called macro fine previously with this code and doesn't now? Is that correct? 

 

If so, something else is the issue. 

Figure out what changed between last run and this and test each change. 

pp2014
Fluorite | Level 6

Yes,  SAS code worked perfectly until yesterday..  

ballardw
Super User

I have found at least one other application, Cisco Jabber, that if running interferes with dde calls and have anecdotal evidence there may be others. In the case of Jabber it is not sufficient to stop running the program but you have to use task manager to kill the process.

 

So you may check with your IT folks about any new or updated program installed since the last time you successfully ran the SAS program.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1983 views
  • 3 likes
  • 3 in conversation