Hallo zusammen hab eine Problem ich bekomm die Variable einfach nicht von der Function in das Sub:
Function read_pw(ByRef rot13text_rotated)
Set WshShell = CreateObject("WScript.Shell")
key = WshShell.regread ("HKEY_CURRENT_USER\Software\key")
locator = StrReverse(key)
For i = 1 To Len(locator)
j = Mid(locator, i, 1) ' take the next character in the string
k = Asc(j) ' find out the character code
If k >= 97 And k =< 109 Then
k = k + 13 ' a ... m inclusive become n ... z
ElseIf k >= 110 And k =< 122 Then
k = k - 13 ' n ... z inclusive become a ... m
ElseIf k >= 65 And k =< 77 Then
k = k + 13 ' A ... M inclusive become N ... Z
ElseIf k >= 78 And k =< 90 Then
k = k - 13 ' N ... Z inclusive become A ... M
End If
rot13text_rotated = rot13text_rotated & Chr(k)
Next
End Function
Sub testEr bringt mir kein Fehler nur ein leere MSGBOX.
ttext = read_pw(rot13text_rotated)
MsgBox ttext
End Sub
Bin für jeden Tipp dankbar.
greetz CaptainOats