can anyone help me,when i use Excel Marco in invoke VBA,when i test in excel,the marco is running well,but when i used in invoke VBA,get such error.below is the marco code which saved txt file
and I’m sure that this invoke vba is kept within a excel application scope
Could you try renaming the file to kkk.vbs and trying again?
Also, if you run into an error once more, kindly share them here as well.
Useful Tip:You can press Ctrl+Shift+S and take a snippet of the screen you wish to capture
Thanks for your fast reply,I will try it again as your advice,and share you the result to u then.
after try again,unfortunately,aslo doesn’t work,can you help me again
Sorry, it had nothing to do with the file extension.
I think it has something to do with the way you have declared your VBA code.
Also, if your excel already contains VBA code, then why not use the
Excecute Macro Activity?
Here is a sample of the code if you are using a normal Excel File:
InvokeVBA Example.zip (14.7 KB)
Sorry for reply late ,I just tested the
Excecute Macro Activity ,definitely work normal,but if I tried use invoke VBA,still get the same error as snapshot, I deleted the macro in excel after saved the macro as kkkk.vbs.
April 6, 2021, 7:06am
if you invoking macro from “Invoke VBA” save your macro in .txt file eg. my_macro.txt
Inside file use pattern:
and refer to
Do not add any content before the SUB. It works for me in this confuguration.
Thanks so much ,problem was solved according your advice ,modified the Macro code as below
ActiveCell.FormulaR1C1 = “=RC*1”
ActiveCell.FormulaR1C1 = “=订单列表!RC”
April 9, 2021, 7:44am
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.