This fixes the issue you described, but you need to validate your input to make sure the value isn't equal to null.
Dim Key, tempString, tempKey, Input
Input = InputBox("Enter Serial!")
Input = int(Input)
Key = ((((((((Input ^ 8) / 92657) + 16) * 7) / 316) - 23) / 71104) + 26) * 24
tempString = CStr(Key)
tempString = Left(tempString, 6)
tempKey = Int(tempString)
if (tempKey < 1000000) then
tempString = CStr(tempKey * 2540)
tempString = Left(tempString, 6)
Key = Int(tempString)
else
Key = tempKey
end if
msgbox (Key)
|