📄 module1.bas
字号:
Attribute VB_Name = "Module1"
Option Explicit
Function KaiSa(ByVal s As String, ByVal Key As Integer, ByVal run As Integer) As String
Dim iLoop As Long
Dim i As Integer
Dim z As Integer
KaiSa = ""
i = 0
z = 2
For iLoop = 1 To Len(s)
'KaiSa = KaiSa & ChrB((AscB(MidB(s, iLoop, 1)) + Key + 256) Mod 256)
'KaiSa = KaiSa + Chr(Asc(Mid(s, iLoop, 1)) + Key)
KaiSa = KaiSa + Chr(Asc(Mid(s, iLoop, 1)) + Key)
i = i + 1
If (i = run) Then
i = 0
If (Key >= 0) Then
Key = Key + z
z = -z
Else
Key = Key - z
z = -z
End If
End If
Next iLoop
End Function
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -