随笔分类 -  VBA

VBA使用中遇到的一些问题
摘要:代码如下: 阅读全文
posted @ 2015-12-18 14:13 Lio5n 阅读(356) 评论(0) 推荐(0)
摘要:代码如下: 阅读全文
posted @ 2015-12-18 14:12 Lio5n 阅读(452) 评论(0) 推荐(0)
摘要:导入的Excel格式和上一篇博文里从PowerDesigner导出到Excel的格式相同,代码如下:Option Explicit'-------------------------------------------------------------------------------'作用:E... 阅读全文
posted @ 2015-12-17 13:33 Lio5n 阅读(747) 评论(0) 推荐(0)
摘要:代码如下,有需要的同学直接复制就可用:Option Explicit'-------------------------------------------------------------------------------'作用:PowerDesigner导出到Excel''作者: Lio5n... 阅读全文
posted @ 2015-12-17 13:31 Lio5n 阅读(1191) 评论(1) 推荐(0)
摘要:下面是利用VBA遍历Excel sheet的例子,可以用于Excel的批量处理。Sub Insert_CodeString()Dim fs, ft As ObjectDim xlApp As Excel.ApplicationDim xlBook As Excel.WorkbookDim xlShe... 阅读全文
posted @ 2015-12-11 17:47 Lio5n 阅读(16904) 评论(0) 推荐(0)
摘要:下面是利用VBA导出文件的例子,可以导出Excel内容等其他可以使用VBA的地方。Sub export_file() Dim fs, ft As Object Dim txtname As String txtname = "export_file" Set fs = Cre... 阅读全文
posted @ 2015-12-11 17:44 Lio5n 阅读(897) 评论(0) 推荐(0)
摘要:主要思想是先给单元格设置名称,再设置超链接代码如下:Sub creat_link()Dim Source As StringSource = "t1"Dim Target As StringTarget = "t2"Dim i As Integeri = 1Dim j As Integerj = 1... 阅读全文
posted @ 2015-12-11 17:36 Lio5n 阅读(2865) 评论(0) 推荐(0)