1. 取剪贴板数据,测试多空格,导入文本 By:lipton Sub test() Dim arr Dim mydata As New DataObject Dim s As String mydata.GetFromClipboard 取剪贴板数据 s = mydata.GetText Do Until InStr(s, ) = 0 测试是否有两个以上...
1. 用字典筛选重复值 by:oobird Private Sub CommandButton3_Click() by:oobird dictionary查找.xls https://club.excelhome.net/dispbbs.asp?boardID=2ID=239140page=1px=0 Dim dic As Object, i% Columns(2).Clear Set dic = CreateObject(Scripti...
1. 轨迹变色 by:Nothwolves 轨迹变色.xls https://club.excelhome.net/dispbbs.asp?boardID=2ID=237019page=1px=0 Sub Macro4() by:northwolves 2007/4/28 Application.ScreenUpdating = False Dim n As Long n = [d65536].End(xlUp).Row [k2].Formula...
1. 不打开工作簿取值 Retrieves a value from a closed workbook https://www.experts-exchange.com/Software/Office_Productivity/Office_Suites/MS_Office/Excel/Q_21848838.html?qid=21848838 Private Function GetValue(path, file, sheet, ref) D...
VBA语句集 (第2辑) ******************************************************* 定制模块行为 (101) Err.Clear 清除程序运行过程中所有的错误 ******************************************************* 工作簿 (102) ThisWorkbook...
1. 筛选 by:Qee用 2007322 请教如何排序筛选.xls Function rr(ByVal s As String) As String Dim i%, arr(1 To 15) As Boolean, ar ar = Split(s, ) For i = 0 To UBound(ar) arr(Val(ar(i))) = True Next i For i = 1 To 15 If Not arr(i) Then r...
1. 合并删除单元格(定时设置) by:sjzhouzb Private Sub CommandButton1_Click() by: sjzhouab 但是只是删除了前面的,与题意有些不同 t = Timer Application.ScreenUpdating = False For i = 1 To [a65536].End(xlUp).Row If Ra...
1. 导出到文本文件 by:chenimbile https://www.excelpx.com/dispbbs.asp?boardid=5id=13772star=1#65435 Private Sub CommandButton1_Click() Dim filesavename As String Dim str2 As String Dim x As Integer Dim maxrow As Integer filesavename = A...
1. 浮动按钮 by:Qee用 https://www.excelpx.com/dispbbs.asp?boardid=5id=13551star=1#63383 Private Sub Worksheet_SelectionChange(ByVal Target As Range) [Button].Top = Target.Top End Sub Sub Fill10() 自动填充十行 Dim rg As Range Applic...
https://excel.aa.topzj.com/viewthread.php?tid=372297extra=page%3D1 Private Sub Workbook_SheetActivate(ByVal Sh As Object) Dim a As Byte a = ActiveSheet.Index If a 4 Then If InputBox(密码:, 请确认密码, 4) = a Then Sheets(a).Select Else...