管理决策与计算机方法 Lecture 06 Working with Other Excel Objects.pdf

管理决策与计算机方法 Lecture 06 Working with Other Excel Objects.pdf

  1. 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
  2. 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  3. 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
Lecture 06 Working with Working with Other Excel Objects Other Excel Objects 1 Application 对象 Application对象是Excel对象模型的顶端对象。 逻辑上所有的Excel对象都需要使用Application 对象来引用,例如,要引用第一个工作簿的第 一个工作表的“A1”单元格: Application.Workbooks(1).Worksheets(1).Range(“A1”) 2 Application 对象 · ScreenUpdating 属性 A VBA program for Excel sometimes makes many changes in one or more worksheets before eventually showing results. During this time the screen can flicker, which wastes time and can be annoying. The following line “turns off” screen updating: Application.ScreenUpdating=False It means “Do the work and just show me the result at the end”. To appreciate how this works, open the file ScreenUpdating.xls. ScreenUpdating.xls It has two buttons, each attached to a sub. Each sub performs the same operations, but one turns off screen updating and the other leaves it on. You will notice the difference! 3 Application 对象 · DisplayAlerts 属性 If you use the Excel interface to delete a worksheet, you get a warning, as shown in the following figure: In some applications you don’t want this warning; you just want the worksheet to be deleted. In this case, you can use the following line: Application.DisplayAlerts=False This can actually be a bit dangerous——you might want a warning later on——so it is a good idea to turn display alerts back on immediately, as in the following line: Application.DisplayAlerts=True 4 Application 对象 · WorksheetFunction 属性 通过Application 对象的WorksheetFunction 属性可使用E

文档评论(0)

xingyuxiaxiang + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档