11 2019 档案
摘要:1、单元格属性 Sub ss() Range("b3:d78").Cells.Select Selection.Interior.Color = vbBlackEnd Sub 2、行属性 Sub row属性() Rows("5:10").Rows("1:1").Select Selection.In
阅读全文
摘要:定制模块行为 (1) Option Explicit '强制对模块内所有变量进行声明 Option Private Module '标记模块为私有,仅对同一工程中其它模块有用,在宏对话框中不显示 Option Compare Text '字符串不区分大小写 Option Base 1 '指定数组的第
阅读全文
摘要:1、获取表格的名称、路径、带路径名称 Sub Wbmsg() Range("a1") = ThisWorkbook.Name Range("a2") = ThisWorkbook.Path Range("a3") = ThisWorkbook.FullName Sheet1.Range("a4")
阅读全文
摘要:1、 Sub 奇数() Dim i As Integer xrow = 1 For i = 1 To 100 Step 2 Cells(xrow, "A").Value = i xrow = xrow + 1 NextEnd Sub 2、 Sub 能被3整除的数() Dim i As Integer
阅读全文
摘要:1、 Sub 判断是否符合条件() Dim i As Integer For i = 1 To 7 If Range("a" & i).Value Like "李*" Then Range("b" & i).Value = "√" Range("b" & i).Font.Color = vbRed
阅读全文
摘要:1、 Sub Arraytest() Dim arr As Variant arr = Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) MsgBox "arr数组的第4个元素为:" & arr(3)End Sub 2、 Sub shishi() Dim arr As Var
阅读全文
浙公网安备 33010602011771号