I'm not sure exactly what you are trying to do here, but the problem is probably that you are ignoring the line-feed carriage-return characters. I can't see where you have defined MIN_ASC but if this value is > 13 then line-feed and carriage-return characters will be lost. Why do you ignore some characters?

You could either choose to encrypt all characters (just remove the "If") or add those that you do not encrypt to the string in an "Else" block.

Thanks a lot for the fast reply Randy. I'm new to all this, (learning) maybe that explains why I must have missed some things. Could you please give me an example of implementing the options you just kindly stated above?

I haven't tried to analyze the affect this may have on the encryption algoritm that you're using.

Since you're "new to this" I can offer these suggestions:

Always use "Option Explicit"
Always use "Option Strict"

These will highlight several other problems and possible problems in your code and force you to actually think about what you're doing and why you're doing it. For example, what is the effect of using the same name for the Password function and its argument? Why are you changing data types so frequently (long to/from integer to/from short)? Have you thought about what will happen in the case of numeric overflows?

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way.
I've always enjoyed working with graphics, but it's never too clever to re-invent …

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties. A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…

Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…