Home > Software engineering >  Help VS2010 call excel macro problem?
Help VS2010 call excel macro problem?

Time:10-19

Help you a great god, and the automatic statements of the company, just took over, a bunch of bug; One problem bothering me for a long time:
In the code
 STD: : string strPath; 
StrPath="' ATL_Template. XLTM";
StrPath +="! CD_Eng_Data_Macro ";
Excel_app. Run (_variant_t (strPath c_str ()), _variant_t ((long) bar_code. The size ()), _variant_t (enableCDEnergyData),//CD_Energy_Data_macro
_variant_t (enableFileExist), vtMissing, vtMissing,
VtMissing, vtMissing, vtMissing,
VtMissing, vtMissing, vtMissing,
VtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing,
VtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing, vtMissing);

OK call acer in the template, the debug implementation, Run directly, the code to Run to excel_app. The blockage of the Run, and not the exception;

CodePudding user response:

In Excel, manually set for low macro security,

CodePudding user response:

Macro security has been set to a minimum! Including the registry to ensure excel exclusive processes are set up, but still won't do, I have to check on the Internet for a few days can't solve, depressed!

CodePudding user response:

Have any master know, nobody reason, his top!!
  • Related