
VBA
文章平均质量分 62
sduzhijian
这个作者很懒,什么都没留下…
展开
-
VBA中遍历文件夹
<br />http://cuidamian.blog.163.com/blog/static/9532228201002921518730/<br /> <br />'首先,打开Office的宏编辑器,选择“工具”-“引用”,选中下面两个对象:<br />'Microsoft Scripting Runtime<br />'Microsoft Script Control 1.0<br />'代码如下:<br />Sub Test()<br /> EnumFiles "C:/Documents an转载 2010-08-10 22:54:00 · 1484 阅读 · 0 评论 -
VBA遍历所有文件夹的两种方法(filesearch和FileSystemObject)
<br />http://excelpx.com/Dispbbs.asp?boardid=177&ID=132522<br /> <br /> 在VBA遍历文件夹和子文件夹中所有文件,常用两种方法,一种是使用VBA的filesercth对象,另外一种是使用FileSystemObject(windows文件管理工具)和递归方法。兰色对代码进行了注解,希望对大家有所帮助<br /> 第一种方法:使用filesearch对象<br /> Sub mysearch()<br />Dim转载 2010-08-10 23:04:00 · 14389 阅读 · 1 评论 -
Excel2003宏模块丢失问题解决
<br />http://hi.baidu.com/snacky/blog/item/2d98980a8d1fad1c94ca6b65.html<br /> 2007年11月01日 星期四 下午 02:31<br /><br /> 星期二忙活了大半天,辛辛苦苦写的VBA代码竟然不翼而飞了。那天走的匆忙,保存之后便关机走人了。今天兴致勃勃打开Excel一瞧,竟提示“模块未找到”。难道是自己没保存吗?于是,做个小实验。重新录制一个宏,然后保存。关掉Excel之后重新打开,问题依旧。看来并不是我的粗转载 2010-08-16 23:25:00 · 4356 阅读 · 0 评论 -
On Error Resume Next
<br />http://club.excelhome.net/thread-558224-1-1.html<br /> <br />Sub range2()<br />Dim myrange As range<br />Dim mystring As String<br />mystring = "请用鼠标选取单元格区域,然后单击【确定】按钮"<br />On Error Resume Next<br />Set myrange = Application.InputBox(mystring, Type:原创 2010-08-26 00:12:00 · 819 阅读 · 0 评论 -
Error Handling In VBA
<br />http://www.cpearson.com/excel/ErrorHandling.htm<br /> <br />Pearson Software Consulting Services<br /> Error Handling In VBA <br /> Introduction<br />Error handling refers to the programming practice of anticipating and coding for error转载 2010-08-26 00:17:00 · 1112 阅读 · 0 评论 -
VBA Error Handling On Error Resume Next
<br />http://vbaexcel.eu/vba-macro-code/vba-error-handling-on-error-resume-next<br /> <br /> <br />This macro code enables the On Error Resume Next function.Explanation<br />To enable On Error Resume Next will make the VBA program skip code that generates转载 2010-08-26 00:10:00 · 1768 阅读 · 0 评论