Access 2010:Excel WorksheetFunction对象模型中缺少YIELD函数的解决方法? [英] Access 2010: Workaround for YIELD function missing from Excel WorksheetFunction Object model?

查看:72
本文介绍了Access 2010:Excel WorksheetFunction对象模型中缺少YIELD函数的解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试将债券交易应用程序从Access 2003转换为2010,并且已经在Excel YIELD功能上发挥作用。


显然它在Excel中存在,但它很明显,微软在进入Office 2007时将其从VBA对象模型中删除,并且认为不适合修复Office 2010中的情况。


ie在VBA代码中  myExcelObject.WorksheetFunction.Yield 失败,
WorksheetFunction 之后的自动完成功能未提供 Yield 作为选择。


我到目前为止做得对吗?


明显的解决方法似乎是创建一个虚拟的Excel工作表,打开一个链接到它的对象,提供参数到那个工作表中的单元格,然后拉出字符串使Excel执行YIELD计算并将结果复制回Access ....但
连续几十甚至几十万计算,我不得不怀疑速度....


如果是这样,有人可以提出更好的建议吗?




- PeteCresswell

解决方案

查看以下链接是否有帮助:


https://stackoverflow.com/questions/45036586/using- yield-function-in-vba




Trying to convert a bond trading app from Access 2003 to 2010, and have hit the wall on the Excel YIELD function.

Obviously it is there in Excel, but it seems pretty clear that Microsoft dropped it from the VBA object model when they went to Office 2007 and did not see fit to remedy the situation in Office 2010.

i.e. in VBA code  myExcelObject.WorksheetFunction.Yield fails and the autocomplete after WorksheetFunction does not offer up Yield as a choice.

Have I got it right so far?

The obvious workaround would seem to be to create a dummy Excel worksheet, open up an object linking to it, feed the parameters to cells in that sheet, and then pull the strings to make Excel do the YIELD calc and copy the results back into Access.... But for tens or even hundreds of thousands of calculations back-to-back, I have to wonder about speed....

If so, can anybody suggest something better?


-- PeteCresswell

解决方案

See if the below link helps:

https://stackoverflow.com/questions/45036586/using-yield-function-in-vba


这篇关于Access 2010:Excel WorksheetFunction对象模型中缺少YIELD函数的解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆