小说网 找小说 无限小说 烟雨红尘 幻想小说 酷文学 深夜书屋

04 2007 档案

EXCEL 判断一个单元格中是否有图片
摘要:比如判断[D8]单元格里有无图片: Sub MACRO1()Dim SH As Shape, HASPIC As BooleanFor Each SH In ActiveSheet.ShapesIf Application.Intersect(Range(SH.TopLeftCell.Addres... 阅读全文

posted @ 2007-04-10 11:24 王峰炬 阅读(1044) 评论(0) 推荐(0)

dir()递归 遍历子目录
摘要:dir()递归即可:Private Sub Command1_Click()Listfiles "d:/JAVA", List1End SubSub Listfiles(ByVal mydir As String, ByVal filelist As ListBox)Dim i As Long, ... 阅读全文

posted @ 2007-04-10 11:19 王峰炬 阅读(575) 评论(0) 推荐(0)

EXCEL 中 判断某个自定义序列是否存在
摘要:Sub Macro1()Dim customlist As String, i As Longcustomlist = "全部自定义序列" & vbCrLf & String(30, "-") & vbCrLfFor i = 1 To Application.CustomListCountcust... 阅读全文

posted @ 2007-04-10 11:17 王峰炬 阅读(236) 评论(0) 推荐(0)

全硬盘高速查找指定文件
摘要:Private Declare Function SearchTreeForFile Lib "ImageHlp.dll" (ByVal lpRoot As String, ByVal lpInPath As String, ByVal lpOutPath As String) As LongPr... 阅读全文

posted @ 2007-04-10 11:03 王峰炬 阅读(137) 评论(0) 推荐(0)

VB中显示TIF(扫描文件)的方法
摘要:添加部件Library MODICtl C:/PROGRA~1/COMMON~1/MICROS~1/MODI/11.0/MDIVWCTL.oca Microsoft Office Document Imaging 11.0 Type Library Private Sub C... 阅读全文

posted @ 2007-04-08 15:05 王峰炬 阅读(242) 评论(0) 推荐(0)

WORD 文档中的艺术字
摘要:如何判断艺术字的样式,字体,字号? Sub macro1() Dim myShape As Shape, s(4) As String For Each myShape In ActiveDocument.Shapes If myShape.Type = msoTextE... 阅读全文

posted @ 2007-04-08 15:01 王峰炬 阅读(137) 评论(0) 推荐(0)

获取EXE文件安装后的路径
摘要:'WINRAR安装路径 Sub GetWINRARPath() Dim WSH As Object Set WSH = CreateObject("Wscript.Shell") MsgBox "WINRAR安装路径:" & WSH.RegRead("HKEY_LOCAL_MACHINE/Soft... 阅读全文

posted @ 2007-04-08 14:58 王峰炬 阅读(202) 评论(0) 推荐(0)

最小公倍数
摘要:“辗转相除法”求解最小公倍数 Function LCM(ParamArray nums()) As Long Dim temp1 As Long, temp2 As Long, I As Long LCM = nums(0) For I = 1 To UBound(nums) temp1 = ... 阅读全文

posted @ 2007-04-08 14:52 王峰炬 阅读(133) 评论(0) 推荐(0)

按行获取文本文件的内容
摘要:不知是不是VB里最简单的方法? Sub getlines(byval filename as string,byref lines() as string) If Len(Dir(filename)) = 0 Then Exit Sub Open filename For Input As #1... 阅读全文

posted @ 2007-04-08 14:47 王峰炬 阅读(117) 评论(0) 推荐(0)

导航