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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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