摘要: 五 局部变量和全局变量 在子程序中定义的变量称为局部变量,在程序的一开始定义的变量称为全局变量。 全局变量作用域是整个程序,局部变量作用域是定义该变量的子程序。 当全局变量与局部变量同名时: 在定义局部变量的子程序内,局部变量起作用;在其它地方全局变量起作用。 global NAME # 已经声明, 阅读全文
posted @ 2020-03-21 17:26 Sundance8866 阅读(247) 评论(0) 推荐(0) 编辑
摘要: 单元格区域复制,后关闭表格 Sub QS1DataCopy() Dim c As Range 'copy the downloaded excel to target excel With ActiveWorkbook.Worksheets(1) maxRow = .Cells(100, 1).En 阅读全文
posted @ 2020-03-20 12:46 Sundance8866 阅读(338) 评论(0) 推荐(0) 编辑
摘要: Sub RowCopy() Dim rngNew As Range Dim rngUpdate As Range Set rngNew = Application.InputBox("Select the range you want to copy from", , , , , , , 8) Se 阅读全文
posted @ 2020-03-20 12:43 Sundance8866 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Sub ImportMessagesInFolder()Dim xSourceFldPath As StringDim xMSG As ObjectDim xMailItem As MailItemDim xSaveFld As Outlook.Folder' copy to outlook vba 阅读全文
posted @ 2020-03-20 10:33 Sundance8866 阅读(707) 评论(0) 推荐(0) 编辑
摘要: Sub BreakAllLinks(wb As Workbook) Dim links As Variant With wb links = .LinkSources(xlLinkTypeExcelLinks) If Not IsEmpty(links) Then For i = 1 To UBou 阅读全文
posted @ 2020-03-20 10:28 Sundance8866 阅读(138) 评论(0) 推荐(0) 编辑
摘要: Sub unmergeRange() Dim rg As Range With ActiveSheet Set rg = .UsedRange rowmax = rg.Rows.Count columnmax = rg.Columns.Count For i = 2 To rowmax For j 阅读全文
posted @ 2020-03-20 10:15 Sundance8866 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Scripting.FileSystemObject 方法或者属性 描述 BuildPath() 生成一个文件路径 CopyFile() 复制文件 CopyFolder() 复制目录 CreateFolder() 创建新目录 CreateTextFile() 生成一个文件 DeleteFile() 阅读全文
posted @ 2020-03-20 10:06 Sundance8866 阅读(985) 评论(0) 推荐(0) 编辑
摘要: https://www.cnblogs.com/wupeiqi/articles/5484747.html 字符串格式化 Python的字符串格式化有两种方式: 百分号方式、format方式 百分号的方式相对来说比较老,而format方式则是比较先进的方式,企图替换古老的方式,目前两者并存。[PEP 阅读全文
posted @ 2020-03-16 22:13 Sundance8866 阅读(318) 评论(0) 推荐(0) 编辑
摘要: MD5 可以作为文件的指纹。 MD5就可以为任何文件(不管其大小、格式、数量)产生一个同样独一无二的“数字指纹”,如果任何人对文件做了任何改动,其MD5值也就是对应的“数字指纹”都会发生变化。 如果要获取任意文件的MD5值,可以使用这些API函数直接获取MD5Init ,MD5Update,MD5F 阅读全文
posted @ 2020-03-16 21:18 Sundance8866 阅读(1147) 评论(0) 推荐(0) 编辑
摘要: ################################################################################################################ 回顾: 字符串 数字 列表 元组 字典 可变不可变: 1.可变:列表,字典 阅读全文
posted @ 2020-03-15 21:38 Sundance8866 阅读(187) 评论(0) 推荐(0) 编辑