Const TLx = 99 '使用次数 Sub deletewhat() If TL > TLx Then MsgBox "体验版试用次数已满,请重新加载宏!": Exit Sub Else TL = TL + 0.1 With Selection Set fx = .Find(cx, , xlValues, xlPart, xlByColumns, , False, False) If Not fx Is Nothing Then firstaddress = fx.Address Do x = x + 1 Set fx = .FindNext(fx) Loop While Not fx Is Nothing And fx.Address <> firstaddress End If If x > 0 Then .Replace cx, "", xlPart, xlByColumns, False, False End With End Sub Sub deletewhat2() If TL > TLx Then MsgBox "体验版试用次数已满,请重新加载宏!": Exit Sub Else TL = TL + 0.1 With Selection Set fx = .Find(cx, , xlValues, xlWhole, xlByColumns, , False, False) If Not fx Is Nothing Then firstaddress = fx.Address Do x = x + 1 Set fx = .FindNext(fx) Loop While Not fx Is Nothing And fx.Address <> firstaddress End If If x > 0 Then .Replace cx, "", xlWhole, xlByColumns, False, False MsgBox x & " 个单元格值为" & cx & ",已删除!" End If End With End Sub
..................... 可以改为写注册表...
[此贴子已经被作者于2008-10-1 0:51:52编辑过] |