Hi @CalebSturges,
It looks like you are really close... I attempted using EG 5.1 (32-bit w/ HF21) and Excel 2013 (32-bit) and your code works for me with one change...
I commented out this line, since retrieving the DefaultValue property was causing an error, presumably since I didn't specify a default value for the prompt I defined:
'Retrieving parm.DefaultValue causes error because no default value was set
'on the prompt I defined
'MsgBox parm.Name & " parameter has default value of " & parm.DefaultValue
MsgBox parm.Name & " parameter"
In EG's View->Prompt Manager, make sure you have at least one prompt defined. For example, I accepted the defaults, which created a text prompt named "Prompt_1". Then, I created a program in EG with this code:
%put "&Prompt_1";
proc print data=sashelp.class;
where sex eq "&Prompt_1";
run;
Then, make sure you associate the prompt with the program by clicking Properties on the program, Prompts page, then add the prompt you want to use with that program. Run the program/project in EG to make sure you get prompted and runs as expected. If so, delete the SAS results output (so you can easily tell if the project was re-run... results recreated), save the project and close EG.
Now when I run the VBA code, the value I specify ("M" or "F") is properly passed into the EG project and used in the code for me.
Casey
... View more