上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 28 下一页
摘要: 运行import this 这句代码后返回的内容 import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is bette 阅读全文
posted @ 2023-04-01 19:16 limalove 阅读(30) 评论(0) 推荐(0)
该文被密码保护。 阅读全文
posted @ 2023-03-19 22:11 limalove 阅读(0) 评论(0) 推荐(0)
摘要: Range.Find 方法 (Excel) 表达式.Find (What, After, LookIn, LookAt, SearchOrder, SearchDirection, MatchCase, MatchByte, SearchFormat) 特别重要的参数是:LookAt,匹配方式,xl 阅读全文
posted @ 2023-01-06 20:58 limalove 阅读(6405) 评论(0) 推荐(0)
摘要: 下面代码的注释特别好 Sub Main() 'Declare a variable as a FileDialog object. Dim fd As FileDialog 'Create a FileDialog object as a File Picker dialog box. Set fd 阅读全文
posted @ 2023-01-06 20:34 limalove 阅读(376) 评论(0) 推荐(0)
摘要: 1,判断文件夹是否存在 Dir( ) , directory dir函数的第2个参数vbdirectory时,可以返回路径下的指定文件和文件夹,如果结果为空” “,表示指定文件夹不存在。 Sub 判断文件夹是否存在() If Dir(ThisWorkbook.Path & "\2022报表", vb 阅读全文
posted @ 2022-12-30 16:21 limalove 阅读(1010) 评论(0) 推荐(0)
摘要: 一、减少对象的调用 二、减少计算次数 三、禁止闪屏 四、增加变量的声明类型 五、减少工作表函数的使用 六、减少VBA函数的使用 七、用静态数组替换动态 八、填充前先清空 九、批量替代个体 十、减少循环次数 十一、巧妙填充公式 一、减少对象的调用 调用对象是非常非常耗费资源的,所以一定要尽可能的少调用 阅读全文
posted @ 2022-12-30 02:03 limalove 阅读(599) 评论(0) 推荐(0)
摘要: DoEvents非常有用,当前程序运行时,可以把控制权交给其他程序,动画演示图标时会用到这句代码,DoEvents转让控制权,在运行一个程序时,可以运行另外一个程序。 例子,视频中是通过公共变量k来中止这个程序,但是没有测试成功。 '在单元格查看就像一个表,显示当前时间 Sub 时间显示() Dim 阅读全文
posted @ 2022-12-29 23:19 limalove 阅读(747) 评论(0) 推荐(0)
摘要: 计算时间差 '计算时间差 Sub test2() Dim t, x, s t = Timer Debug.Print t For x = 1 To 900000 s = s + x Next x Debug.Print Timer - t End Sub DateDiff函数 ' datediff( 阅读全文
posted @ 2022-12-29 22:40 limalove 阅读(513) 评论(0) 推荐(0)
摘要: 1,返回当前日期,时间 ' 1, 返回当前日期,时间 Debug.Print "当前日期:" & Date Debug.Print "当前时间:" & Time Debug.Print "当前日期和时间:" & Now 2,格式化显示日期 ' 2格式化显示日期 Debug.Print vbNewLi 阅读全文
posted @ 2022-12-29 21:57 limalove 阅读(843) 评论(0) 推荐(0)
摘要: 注意:使用VBA.TypeName() 判断单元格内容的数据类型时,单元格一定要使用value属性。(切记切记,否则返回的类型是Range) 判断是否为空 VBA.IsEmpty() VBA.TypeName() 判断是否为数字类型 VBA.Isnumeric() Application.Works 阅读全文
posted @ 2022-12-29 21:35 limalove 阅读(465) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 28 下一页