版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、利用vba实现网页中自动录入成绩2010?8?)?d16?d3?d?)?1?(?9?q)journalofanqingteacherscollege(naturalscienceedition)aug?a2010voi?a16no?a3?7?pvba?m?f?1?r2(1?a?t?)?1?l?w?r?o?200241?n2?a?7?l?3?a?*?u?r?7?325035)?cvba?woffice?c?c?p?e?u?r?p?9?office?m0?d?7?pexcel?m?vba?o?e?u?r?3?pexcel?m?f?m?3?f?r?um0?u?m0?d?r?)?d?g?i?s?r?j
2、?p?km0?w?cvba?nole?n?m?3?ctp311?w?(?2?ca?e?c1007vg4260(2010)03-0124-040?t?21?e?w?-?e?h?c?r?e?c?l?m?o?m2?gm2?3?8?-?m0?8?o?p?n?r?u?o?p?e?3?w?r?8?v?p?e?r?z?p?*?e?3m0?o?j?m2?f?r?p?8?o?r?p?q?r?d?j?m2?f?r?r?)?x?n?m0?f?r?)?c?r?3?d?8?f?*?q?f?m?f?-?m?3?m0?d?c?)?r?w?y?>?f?r?i?s?n?m0?l?c?*?q?f?w?pexcel?r?d?
3、=?excelvba?z?r?e?u?3excel?j?m?3?f?m01?vba?vba(visualbasicforapplication)?w?c?p?office?e?r?poffice?8?-?m?r?p?9?office?r?l?l?office?pm0?=?p?p?p?u?basic?r?p?e?u?m2?p?o?avisualbasic?r?r?p?r?i?i?p?r?i?m0?p?poffice?c?r?y?c?z?m?n?l?r?p?w?p?8?3?l?r?c?f?r?r?c?vba?e?8?3?r?3?em02?u?2?a1vba?p?u?m?&?v?r?m2?&
4、amp;?km2?m2?e?w?m0?pvba?2?m?r?p?p?e?f?l?k?r?p?m0?vba?m?wapplication?r?papplication?m?6?p?)(?document?rwindows?rselecvgtion?rcommandbars?)?r?u?2?p?p?u?m?n?microsoftexcel?u?r?9?a?pmicrosoftexcel?m?um0setxl=createobject(vsexcel?asheetvs)x1?aapplication?aworkbooks?aopenvsnewbook?axlsvs2?a20le?o?*?9?u?d?
5、c2009vg12vg09?6?c?r?r?r?r?t?)?1?l?w?p?r?7?l?3?a?*?u?)?r?g?a?n?z?pm03?d?c?7?pvba?m?f?125?ole?o?wmicrosoft?w?r?>?p?-?p?u?m?p?e?-?p?u?r?>?c?t?p?-?p?u?l?e?m0?c?ole?e?r?a?p?p?u?vt?d?pvs?f?p?u?3?e?r?r?l?l?r?7?d?r?n?r?=?wole?e?x?8?r?vba?mcreateobject?r?c?-?a?w?2ole?o?p?u?t?pm0?u?2?3?n?-microsoftexcel
6、?*?p?3?exvgeelsheetm0dimexcelsheetasobjectsetexcelsheet=createobject(vsexcel?asheetvs)3?u?g?23?a1?n?l?j?o?1?u?addbar()?r?n?vt?f?3vs?l?r?)?m0?2?usubaddbar()dimtoolsnameasstringtoolsname=vs?f?3vsonerrorresumenextapplication?acommandbars(toolsname)?adelete7?b?c?o?l?r?q?v?setgj=application?acommandbars?
7、aadd(name?c=toolsname?rposition?c=msobartop?rtemporary?c=true)vs?n?vt?f?3vs?k?l?r?excel?c?v?setmcommand=gj?acontrols?aadd(type?c=msocontrolbutton?rid?c=2949)withmcommand?acaption?vs?f?vs?astyle=msobuttoncaption?aonaction=vsstartfillvsendwithvs?zvt?f?3vs?l?r?-vt?f?vs?j?gj?avisiblevgtruemsgboxvs?l?fvs
8、endsub3?a2?f?o?1?u?autofill(colasstring)?r?3excel?*?q?f?m?j?m?c?f?m?col?c(col?k?zpsm2qzm2qm?esy)?c?d?m0?f?1?<?zm0?1?m?8?f?c?f?r?c?=?3?r?&?k?m?datagridlvgctl2?kx(xx?zps?rqz?rqm?esy)?z?m?p?f?d?phtml?2?m?n?m0?1?3?f?2?u?csubautofill(colasstring)setoshell=createobject(vsshell?aapplicationvs)vs?n?s
9、hell?setow=oshell?awindows()7?n?shell?el?ow126?)?1?(?9?q)2010?found=falsevs?j?m?3?f?onerrorgotoerrhandfori=0toow?acount?17?<?j?nm=ucase(ow?aitem(i)?afullname)vs?n?w?r?s?r?u?-(?ie?maxthon?)ifinstr(nm?rvsiexplore?aexevs)=0andinstr(nm?rvsmaxthon?aexevs)=0thengotopassifow?aitem(i)?adocument?atitle<
10、;>vs?3?vsthengotopassiflen(ow?aitem(i)?adocument?abody?ainnertext)<1000thengotopassno=1found=truevs?m?3?f?vs?3excel?*?q?f?m?j?m?c?f?f?-?m?c?d?rforeachrinselectionno=no+maid=vsdatagridlctlvs&no?3ifvgtl&colow?aitem(i)?adocument?agetelementbyld(id)?avalue=nextpass?cnextifnotfoundthenmsgbo
11、xvs?f?vsuserforml?ahidevs?u?g?exitsuberrhand?cresumepassendsub3?a3?2?o?1?u?startfill()?r?h?z?u?substartfill()userforml?ashowendsubstr(round(r?avalue?r0)?1?u?userforml?1?r?g?6?u?s?e?2?vt?vs?j?2m0privatesubcommandlvgclick()vm?vs?j?2?r?1?pautofill?autofillright(listl?atext?r2)endsubprivatesublistl?dblc
12、lick(byvalcancelasmsforms?areturnboolean)commandl?a?aclickendsubprivatesubuserforminitialize()?u?s?elistl?aaddhemvs?f?psvslistl?aaddltemvs?d?m?f?qzvslistl?aaddltemvs?d?p?f?qmvslistl?aaddltemvs?f?syvs3?d?c?7?pvba?m?f?127?endsub4?d?7?pvba?p?3?f?m?f?r?w?)?n?>?f?i?s?r?m?c?)?m0?p?u?r?q?*?q?f?excel?r?3
13、?m?c?f?j?m?r?vt?f?3vs?l?m?vt?f?vs?j?r?p?a?f?c?m?j?m?f?m0?u?j?c?-?m?r?p?u?m?j?w?x?w?f?r?j?6?o?2m0?1?w?c113?h?aexcel?q?vgvgvba?a?hm?a?c?c?a?*?q?h?r2006?aez?aexcelvba?p?<?m?m?a?c?c?*?c?q?h?r2007?ci?30?a3?r?a?vba?p?3?j?a?)?1?c?9?q?r2007(04)?c67vg70?aregisterresultinthewebpageautomaticallybyusingvbaji
14、angzhi(eastchinanormaluniversity?rcollegeofinformationscienceandtechnology?rmasterofscience?rshanghaim0200241?nwenzhouuniversity?rcollegeofphysics&electronicinformationengineering?azhejiang325035)abstract?cvbaisacommonprogramminglanguageembeddedinoffice?rwhichisusedtocustomizeandexpandthefunctio
15、nsofoffice?ainthisarticle?rtheauthorusesvbainexceltoredevelopprogramming?rwhichachievesthefunctionofinputtingautomaticallytheresultssavedintheexcelfilesintothepageforresultsregistrationintheinformationmanvgagementsystemm0andtheauthoralsoexplainshowtheprocessisachievedindetails?atheprogramissimpleand
16、rapidinautomaticinput?rsolvingtheproblemssuchasslownessanderrorvgproneofmanualinput?atheprogramisofcertainpracvgticalvalue?akeywords?cvba?nole?rrecordautomatically(?o?d120?)?w?m0?vt?vs?z?m?o?l?w?vt?p?r?p?vs?3?r?d?p?m?m?r?p?m?n?vt?vs?z?m?o?l?d?3?m2?m0?a?r?o?l?o?*?w?u?p?r?d?n?r?p?u?j?<?l?m0?1?w?ce1
17、?a?*?w?<(?o?3)m?a?q?h?r2006?n121vg126?a2?a?o?*?w?f?o?l?ij?a?*?g?*?2008?r30(3)?c4vg5?a3?v?a?o?*?w?<?a?ui-m?a?q?h?r2006?c58vg61?ateachingmodeinanalogelectronictechniquebydummyitemdingxiao-gui?rqianmeng(departmentofcomputerandinformation?ranqingteacherscollege?ranqing246133)abstract?canalogelectronictechniqueisoneofthebasiccoursesofelectricalinformationscience?ainordertokeepplacewiththenewdevelopmentinthisfield?rcultivateinnovativestudentsandpromoteabilitycourses?rtherefortlxisprovgposedwithmodifyingteachingcontent
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024房地产交易居间合同规范本
- 2024年特高压输电线路施工合同标的及工程周期
- 个人投资协议书(2024版):生态农业项目投资3篇
- 2024版二手汽车转让合同标准范本
- 2024桥梁建设项目资金结算与管理合同范本3篇
- 专业冷链物流合作合同2024年版版B版
- 2024房产项目土地征收合同3篇
- 2024年简明劳务服务分包协议样本版B版
- 2024年重型货车驾驶员劳务协议模板版B版
- 医院重症医学科爱细优护佑生命之光
- 信访邮寄材料地址【四篇】
- 商品拍摄与素材编辑-课程标准
- 银行 重点客户管理办法模版
- 中等职业学校班主任能力比赛幼儿保育专业班级建设方案
- 你来比划我来猜词语(超搞笑版)
- 施工总平面布置图及说明及施工现场平面布置图
- GB/T 42270-2022多孔疏水膜的疏水性能测试方法
- 2023年高中生学校打牌检讨书(五篇)
- 滕王阁序带拼音全文译文
- 沙盘软件系统操作手册
- GB/T 8429-1998纺织品色牢度试验耐气候色牢度:室外曝晒
评论
0/150
提交评论